File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
cpp/ql/src/semmle/code/cpp/ir/internal Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -453,12 +453,19 @@ CppPRValueType getCanonicalUnsignedIntegerType(int byteSize) {
453
453
*/
454
454
private int getPrecisionPriority ( RealNumberType type ) {
455
455
// Prefer `double`, `float`, `long double` in that order.
456
- if type instanceof DoubleType then result = 4
457
- else if type instanceof FloatType then result = 3
458
- else if type instanceof LongDoubleType then result = 2
459
- // If we get this far, prefer non-extended-precision types.
460
- else if not type .isExtendedPrecision ( ) then result = 1
461
- else result = 0
456
+ if type instanceof DoubleType
457
+ then result = 4
458
+ else
459
+ if type instanceof FloatType
460
+ then result = 3
461
+ else
462
+ if type instanceof LongDoubleType
463
+ then result = 2
464
+ else
465
+ // If we get this far, prefer non-extended-precision types.
466
+ if not type .isExtendedPrecision ( )
467
+ then result = 1
468
+ else result = 0
462
469
}
463
470
464
471
/**
You can’t perform that action at this time.
0 commit comments