From e6cd27a99273c7aea4d670c6e6e7803065668b83 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 13 Aug 2025 09:55:59 +0200 Subject: [PATCH] C++: Skip non-Boolean instructions in the new inference step. --- .../semmle/code/cpp/controlflow/IRGuards.qll | 95 ++++++++++-- .../controlflow/guards/GuardsCompare.expected | 110 +++++++++++++- .../controlflow/guards/GuardsEnsure.expected | 141 ++++++++++++++++++ .../MissingCheckScanf.expected | 1 - .../Critical/MissingCheckScanf/test.c | 2 +- 5 files changed, 329 insertions(+), 20 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll index 0b3a6877729..66bfaa8f7fa 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll @@ -936,6 +936,77 @@ private module Cached { ValueNumber getUnary() { result.getAnInstruction() = instr.getUnary() } } + signature predicate sinkSig(Instruction instr); + + private module BooleanInstruction { + /** + * Holds if `i1` flows to `i2` in a single step and `i2` is not an + * instruction that produces a value of Boolean type. + */ + private predicate stepToNonBoolean(Instruction i1, Instruction i2) { + not i2.getResultIRType() instanceof IRBooleanType and + ( + i2.(CopyInstruction).getSourceValue() = i1 + or + i2.(ConvertInstruction).getUnary() = i1 + or + i2.(BuiltinExpectCallInstruction).getArgument(0) = i1 + ) + } + + private predicate rev(Instruction instr) { + isSink(instr) + or + exists(Instruction instr1 | + rev(instr1) and + stepToNonBoolean(instr, instr1) + ) + } + + private predicate hasBooleanType(Instruction instr) { + instr.getResultIRType() instanceof IRBooleanType + } + + private predicate fwd(Instruction instr) { + rev(instr) and + ( + hasBooleanType(instr) + or + exists(Instruction instr0 | + fwd(instr0) and + stepToNonBoolean(instr0, instr) + ) + ) + } + + private predicate prunedStep(Instruction i1, Instruction i2) { + fwd(i1) and + fwd(i2) and + stepToNonBoolean(i1, i2) + } + + private predicate stepsPlus(Instruction i1, Instruction i2) = + doublyBoundedFastTC(prunedStep/2, hasBooleanType/1, isSink/1)(i1, i2) + + /** + * Gets the Boolean-typed instruction that defines `instr` before any + * integer conversions are applied, if any. + */ + Instruction get(Instruction instr) { + isSink(instr) and + ( + result = instr + or + stepsPlus(result, instr) + ) and + hasBooleanType(result) + } + } + + private predicate isUnaryComparesEqLeft(Instruction instr) { + unary_compares_eq(_, instr.getAUse(), 0, _, _) + } + /** * Holds if `left == right + k` is `areEqual` given that test is `testIsTrue`. * @@ -971,7 +1042,8 @@ private module Cached { // 1. test = value -> int(l) = 0 is !bv unary_compares_eq(test, l, 0, bv.getValue().booleanNot(), value) and // 2. l = bv -> left + right is areEqual - compares_eq(valueNumberOfOperand(l), left, right, k, areEqual, bv) + compares_eq(valueNumber(BooleanInstruction::get(l.getDef())), left, + right, k, areEqual, bv) // We want this to hold: // `test = value -> left + right is areEqual` // Applying 2 we need to show: @@ -1021,7 +1093,8 @@ private module Cached { // See argument for why this is correct in compares_eq exists(Operand l, BooleanValue bv | unary_compares_eq(test, l, 0, bv.getValue().booleanNot(), value) and - unary_compares_eq(valueNumberOfOperand(l), op, k, areEqual, bv) + unary_compares_eq(valueNumber(BooleanInstruction::get(l.getDef())), + op, k, areEqual, bv) ) or unary_compares_eq(test.(BuiltinExpectCallValueNumber).getCondition(), op, k, areEqual, value) @@ -1119,17 +1192,17 @@ private module Cached { ) } + private predicate isBuiltInExpectArg(Instruction instr) { + instr = any(BuiltinExpectCallInstruction buildinExpect).getArgument(0) + } + /** A call to the builtin operation `__builtin_expect`. */ private class BuiltinExpectCallInstruction extends CallInstruction { BuiltinExpectCallInstruction() { this.getStaticCallTarget().hasName("__builtin_expect") } /** Gets the condition of this call. */ - Instruction getCondition() { result = this.getConditionOperand().getDef() } - - Operand getConditionOperand() { - // The first parameter of `__builtin_expect` has type `long`. So we skip - // the conversion when inferring guards. - result = this.getArgument(0).(ConvertInstruction).getUnaryOperand() + Instruction getCondition() { + result = BooleanInstruction::get(this.getArgument(0)) } } @@ -1222,7 +1295,8 @@ private module Cached { // See argument for why this is correct in compares_eq exists(Operand l, BooleanValue bv | unary_compares_eq(test, l, 0, bv.getValue().booleanNot(), value) and - compares_lt(valueNumberOfOperand(l), left, right, k, isLt, bv) + compares_lt(valueNumber(BooleanInstruction::get(l.getDef())), left, + right, k, isLt, bv) ) } @@ -1247,7 +1321,8 @@ private module Cached { // See argument for why this is correct in compares_eq exists(Operand l, BooleanValue bv | unary_compares_eq(test, l, 0, bv.getValue().booleanNot(), value) and - compares_lt(valueNumberOfOperand(l), op, k, isLt, bv) + compares_lt(valueNumber(BooleanInstruction::get(l.getDef())), op, k, + isLt, bv) ) } diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected index 6399d278650..5d3232d50fa 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected @@ -292,20 +292,12 @@ | test.c:176:10:176:14 | ... < ... | a >= b+0 when ... < ... is false | | test.c:176:10:176:14 | ... < ... | b < a+1 when ... < ... is false | | test.c:176:10:176:14 | ... < ... | b >= a+1 when ... < ... is true | -| test.c:182:8:182:34 | ! ... | 1.0 >= foo+1 when ! ... is false | -| test.c:182:8:182:34 | ! ... | 9.999999999999999547e-07 < foo+1 when ! ... is false | | test.c:182:8:182:34 | ! ... | ! ... != 0 when ! ... is true | | test.c:182:8:182:34 | ! ... | ! ... != 1 when ! ... is false | | test.c:182:8:182:34 | ! ... | ! ... == 0 when ! ... is false | | test.c:182:8:182:34 | ! ... | ! ... == 1 when ! ... is true | | test.c:182:8:182:34 | ! ... | ... && ... != 0 when ! ... is false | | test.c:182:8:182:34 | ! ... | ... && ... == 0 when ! ... is true | -| test.c:182:8:182:34 | ! ... | ... < ... != 0 when ! ... is false | -| test.c:182:8:182:34 | ! ... | ... < ... == 1 when ! ... is false | -| test.c:182:8:182:34 | ! ... | ... >= ... != 0 when ! ... is false | -| test.c:182:8:182:34 | ! ... | ... >= ... == 1 when ! ... is false | -| test.c:182:8:182:34 | ! ... | foo < 1.0+0 when ! ... is false | -| test.c:182:8:182:34 | ! ... | foo >= 9.999999999999999547e-07+0 when ! ... is false | | test.c:182:10:182:20 | ... >= ... | 9.999999999999999547e-07 < foo+1 when ... >= ... is true | | test.c:182:10:182:20 | ... >= ... | 9.999999999999999547e-07 >= foo+1 when ... >= ... is false | | test.c:182:10:182:20 | ... >= ... | ... >= ... != 0 when ... >= ... is true | @@ -340,42 +332,84 @@ | test.c:190:7:190:8 | ! ... | ! ... != 1 when ! ... is false | | test.c:190:7:190:8 | ! ... | ! ... == 0 when ! ... is false | | test.c:190:7:190:8 | ! ... | ! ... == 1 when ! ... is true | +| test.c:190:7:190:8 | ! ... | a != b+0 when ! ... is false | +| test.c:190:7:190:8 | ! ... | a == b+0 when ! ... is true | +| test.c:190:7:190:8 | ! ... | b != a+0 when ! ... is false | +| test.c:190:7:190:8 | ! ... | b == a+0 when ! ... is true | | test.c:190:7:190:8 | ! ... | c != 0 when ! ... is false | | test.c:190:7:190:8 | ! ... | c == 0 when ! ... is true | | test.c:190:8:190:8 | c | ! ... != 0 when c is false | | test.c:190:8:190:8 | c | ! ... != 1 when c is true | | test.c:190:8:190:8 | c | ! ... == 0 when c is true | | test.c:190:8:190:8 | c | ! ... == 1 when c is false | +| test.c:190:8:190:8 | c | a != b+0 when c is true | +| test.c:190:8:190:8 | c | a == b+0 when c is false | +| test.c:190:8:190:8 | c | b != a+0 when c is true | +| test.c:190:8:190:8 | c | b == a+0 when c is false | | test.c:190:8:190:8 | c | c != 0 when c is true | | test.c:190:8:190:8 | c | c == 0 when c is false | +| test.c:198:7:198:8 | ! ... | 10 < a+0 when ! ... is false | +| test.c:198:7:198:8 | ! ... | 10 >= a+0 when ! ... is true | | test.c:198:7:198:8 | ! ... | ! ... != 0 when ! ... is true | | test.c:198:7:198:8 | ! ... | ! ... != 1 when ! ... is false | | test.c:198:7:198:8 | ! ... | ! ... == 0 when ! ... is false | | test.c:198:7:198:8 | ! ... | ! ... == 1 when ! ... is true | +| test.c:198:7:198:8 | ! ... | a < 10+1 when ! ... is true | +| test.c:198:7:198:8 | ! ... | a < 11 when ! ... is true | +| test.c:198:7:198:8 | ! ... | a >= 10+1 when ! ... is false | +| test.c:198:7:198:8 | ! ... | a >= 11 when ! ... is false | | test.c:198:7:198:8 | ! ... | b != 0 when ! ... is false | | test.c:198:7:198:8 | ! ... | b == 0 when ! ... is true | +| test.c:198:8:198:8 | b | 10 < a+0 when b is true | +| test.c:198:8:198:8 | b | 10 >= a+0 when b is false | | test.c:198:8:198:8 | b | ! ... != 0 when b is false | | test.c:198:8:198:8 | b | ! ... != 1 when b is true | | test.c:198:8:198:8 | b | ! ... == 0 when b is true | | test.c:198:8:198:8 | b | ! ... == 1 when b is false | +| test.c:198:8:198:8 | b | a < 10+1 when b is false | +| test.c:198:8:198:8 | b | a < 11 when b is false | +| test.c:198:8:198:8 | b | a >= 10+1 when b is true | +| test.c:198:8:198:8 | b | a >= 11 when b is true | | test.c:198:8:198:8 | b | b != 0 when b is true | | test.c:198:8:198:8 | b | b == 0 when b is false | | test.c:206:7:206:8 | ! ... | ! ... != 0 when ! ... is true | | test.c:206:7:206:8 | ! ... | ! ... != 1 when ! ... is false | | test.c:206:7:206:8 | ! ... | ! ... == 0 when ! ... is false | | test.c:206:7:206:8 | ! ... | ! ... == 1 when ! ... is true | +| test.c:206:7:206:8 | ! ... | a < b+1 when ! ... is true | +| test.c:206:7:206:8 | ! ... | a >= b+1 when ! ... is false | +| test.c:206:7:206:8 | ! ... | b < a+0 when ! ... is false | +| test.c:206:7:206:8 | ! ... | b >= a+0 when ! ... is true | | test.c:206:7:206:8 | ! ... | c != 0 when ! ... is false | | test.c:206:7:206:8 | ! ... | c == 0 when ! ... is true | | test.c:206:8:206:8 | c | ! ... != 0 when c is false | | test.c:206:8:206:8 | c | ! ... != 1 when c is true | | test.c:206:8:206:8 | c | ! ... == 0 when c is true | | test.c:206:8:206:8 | c | ! ... == 1 when c is false | +| test.c:206:8:206:8 | c | a < b+1 when c is false | +| test.c:206:8:206:8 | c | a >= b+1 when c is true | +| test.c:206:8:206:8 | c | b < a+0 when c is true | +| test.c:206:8:206:8 | c | b >= a+0 when c is false | | test.c:206:8:206:8 | c | c != 0 when c is true | | test.c:206:8:206:8 | c | c == 0 when c is false | +| test.c:215:6:215:18 | call to __builtin_expect | ... > ... != 0 when call to __builtin_expect is true | +| test.c:215:6:215:18 | call to __builtin_expect | ... > ... == 0 when call to __builtin_expect is false | +| test.c:215:6:215:18 | call to __builtin_expect | a < b+1 when call to __builtin_expect is false | +| test.c:215:6:215:18 | call to __builtin_expect | a >= b+1 when call to __builtin_expect is true | +| test.c:215:6:215:18 | call to __builtin_expect | b < a+0 when call to __builtin_expect is true | +| test.c:215:6:215:18 | call to __builtin_expect | b >= a+0 when call to __builtin_expect is false | | test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect != 0 when call to __builtin_expect is true | | test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect != 1 when call to __builtin_expect is false | | test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect == 0 when call to __builtin_expect is false | | test.c:215:6:215:18 | call to __builtin_expect | call to __builtin_expect == 1 when call to __builtin_expect is true | +| test.c:219:9:219:22 | call to __builtin_expect | 42 < a+0 when call to __builtin_expect is true | +| test.c:219:9:219:22 | call to __builtin_expect | 42 >= a+0 when call to __builtin_expect is false | +| test.c:219:9:219:22 | call to __builtin_expect | ... > ... != 0 when call to __builtin_expect is true | +| test.c:219:9:219:22 | call to __builtin_expect | ... > ... == 0 when call to __builtin_expect is false | +| test.c:219:9:219:22 | call to __builtin_expect | a < 42+1 when call to __builtin_expect is false | +| test.c:219:9:219:22 | call to __builtin_expect | a < 43 when call to __builtin_expect is false | +| test.c:219:9:219:22 | call to __builtin_expect | a >= 42+1 when call to __builtin_expect is true | +| test.c:219:9:219:22 | call to __builtin_expect | a >= 43 when call to __builtin_expect is true | | test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect != 0 when call to __builtin_expect is true | | test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect != 1 when call to __builtin_expect is false | | test.c:219:9:219:22 | call to __builtin_expect | call to __builtin_expect == 0 when call to __builtin_expect is false | @@ -837,6 +871,10 @@ | test.cpp:247:6:247:18 | ... == ... | ... == ... == 0 when ... == ... is true | | test.cpp:247:6:247:18 | ... == ... | ... == ... == 0+0 when ... == ... is true | | test.cpp:247:6:247:18 | ... == ... | ... == ... == 1 when ... == ... is true | +| test.cpp:247:6:247:18 | ... == ... | a != b+0 when ... == ... is true | +| test.cpp:247:6:247:18 | ... == ... | a == b+0 when ... == ... is false | +| test.cpp:247:6:247:18 | ... == ... | b != a+0 when ... == ... is true | +| test.cpp:247:6:247:18 | ... == ... | b == a+0 when ... == ... is false | | test.cpp:253:6:253:18 | ... != ... | 0 != ... == ...+0 when ... != ... is true | | test.cpp:253:6:253:18 | ... != ... | 0 == ... == ...+0 when ... != ... is false | | test.cpp:253:6:253:18 | ... != ... | ... != ... != 0 when ... != ... is true | @@ -847,6 +885,10 @@ | test.cpp:253:6:253:18 | ... != ... | ... == ... != 0+0 when ... != ... is true | | test.cpp:253:6:253:18 | ... != ... | ... == ... == 0 when ... != ... is false | | test.cpp:253:6:253:18 | ... != ... | ... == ... == 0+0 when ... != ... is false | +| test.cpp:253:6:253:18 | ... != ... | a != b+0 when ... != ... is false | +| test.cpp:253:6:253:18 | ... != ... | a == b+0 when ... != ... is true | +| test.cpp:253:6:253:18 | ... != ... | b != a+0 when ... != ... is false | +| test.cpp:253:6:253:18 | ... != ... | b == a+0 when ... != ... is true | | test.cpp:260:6:260:18 | ... == ... | 0 != ... != ...+0 when ... == ... is false | | test.cpp:260:6:260:18 | ... == ... | 0 == ... != ...+0 when ... == ... is true | | test.cpp:260:6:260:18 | ... == ... | ... != ... != 0 when ... == ... is false | @@ -857,6 +899,10 @@ | test.cpp:260:6:260:18 | ... == ... | ... == ... != 1 when ... == ... is false | | test.cpp:260:6:260:18 | ... == ... | ... == ... == 0 when ... == ... is false | | test.cpp:260:6:260:18 | ... == ... | ... == ... == 1 when ... == ... is true | +| test.cpp:260:6:260:18 | ... == ... | a != b+0 when ... == ... is false | +| test.cpp:260:6:260:18 | ... == ... | a == b+0 when ... == ... is true | +| test.cpp:260:6:260:18 | ... == ... | b != a+0 when ... == ... is false | +| test.cpp:260:6:260:18 | ... == ... | b == a+0 when ... == ... is true | | test.cpp:266:6:266:18 | ... != ... | 0 != ... != ...+0 when ... != ... is true | | test.cpp:266:6:266:18 | ... != ... | 0 == ... != ...+0 when ... != ... is false | | test.cpp:266:6:266:18 | ... != ... | ... != ... != 0 when ... != ... is true | @@ -865,6 +911,10 @@ | test.cpp:266:6:266:18 | ... != ... | ... != ... == 0 when ... != ... is false | | test.cpp:266:6:266:18 | ... != ... | ... != ... == 0+0 when ... != ... is false | | test.cpp:266:6:266:18 | ... != ... | ... != ... == 1 when ... != ... is true | +| test.cpp:266:6:266:18 | ... != ... | a != b+0 when ... != ... is true | +| test.cpp:266:6:266:18 | ... != ... | a == b+0 when ... != ... is false | +| test.cpp:266:6:266:18 | ... != ... | b != a+0 when ... != ... is true | +| test.cpp:266:6:266:18 | ... != ... | b == a+0 when ... != ... is false | | test.cpp:273:6:273:17 | ... == ... | 0 != ... < ...+0 when ... == ... is false | | test.cpp:273:6:273:17 | ... == ... | 0 == ... < ...+0 when ... == ... is true | | test.cpp:273:6:273:17 | ... == ... | ... < ... != 0 when ... == ... is false | @@ -875,6 +925,10 @@ | test.cpp:273:6:273:17 | ... == ... | ... == ... != 1 when ... == ... is false | | test.cpp:273:6:273:17 | ... == ... | ... == ... == 0 when ... == ... is false | | test.cpp:273:6:273:17 | ... == ... | ... == ... == 1 when ... == ... is true | +| test.cpp:273:6:273:17 | ... == ... | a < b+0 when ... == ... is false | +| test.cpp:273:6:273:17 | ... == ... | a >= b+0 when ... == ... is true | +| test.cpp:273:6:273:17 | ... == ... | b < a+1 when ... == ... is true | +| test.cpp:273:6:273:17 | ... == ... | b >= a+1 when ... == ... is false | | test.cpp:279:6:279:17 | ... != ... | 0 != ... < ...+0 when ... != ... is true | | test.cpp:279:6:279:17 | ... != ... | 0 == ... < ...+0 when ... != ... is false | | test.cpp:279:6:279:17 | ... != ... | ... != ... != 0 when ... != ... is true | @@ -885,8 +939,14 @@ | test.cpp:279:6:279:17 | ... != ... | ... < ... != 0+0 when ... != ... is true | | test.cpp:279:6:279:17 | ... != ... | ... < ... == 0 when ... != ... is false | | test.cpp:279:6:279:17 | ... != ... | ... < ... == 0+0 when ... != ... is false | +| test.cpp:279:6:279:17 | ... != ... | a < b+0 when ... != ... is true | +| test.cpp:279:6:279:17 | ... != ... | a >= b+0 when ... != ... is false | +| test.cpp:279:6:279:17 | ... != ... | b < a+1 when ... != ... is false | +| test.cpp:279:6:279:17 | ... != ... | b >= a+1 when ... != ... is true | | test.cpp:287:6:287:19 | ... == ... | 0 != ... == ...+0 when ... == ... is false | | test.cpp:287:6:287:19 | ... == ... | 0 == ... == ...+0 when ... == ... is true | +| test.cpp:287:6:287:19 | ... == ... | 42 != a+0 when ... == ... is true | +| test.cpp:287:6:287:19 | ... == ... | 42 == a+0 when ... == ... is false | | test.cpp:287:6:287:19 | ... == ... | ... == ... != 0 when ... == ... is false | | test.cpp:287:6:287:19 | ... == ... | ... == ... != 0 when ... == ... is true | | test.cpp:287:6:287:19 | ... == ... | ... == ... != 0+0 when ... == ... is false | @@ -895,8 +955,14 @@ | test.cpp:287:6:287:19 | ... == ... | ... == ... == 0 when ... == ... is true | | test.cpp:287:6:287:19 | ... == ... | ... == ... == 0+0 when ... == ... is true | | test.cpp:287:6:287:19 | ... == ... | ... == ... == 1 when ... == ... is true | +| test.cpp:287:6:287:19 | ... == ... | a != 42 when ... == ... is true | +| test.cpp:287:6:287:19 | ... == ... | a != 42+0 when ... == ... is true | +| test.cpp:287:6:287:19 | ... == ... | a == 42 when ... == ... is false | +| test.cpp:287:6:287:19 | ... == ... | a == 42+0 when ... == ... is false | | test.cpp:293:6:293:19 | ... != ... | 0 != ... == ...+0 when ... != ... is true | | test.cpp:293:6:293:19 | ... != ... | 0 == ... == ...+0 when ... != ... is false | +| test.cpp:293:6:293:19 | ... != ... | 42 != a+0 when ... != ... is false | +| test.cpp:293:6:293:19 | ... != ... | 42 == a+0 when ... != ... is true | | test.cpp:293:6:293:19 | ... != ... | ... != ... != 0 when ... != ... is true | | test.cpp:293:6:293:19 | ... != ... | ... != ... != 1 when ... != ... is false | | test.cpp:293:6:293:19 | ... != ... | ... != ... == 0 when ... != ... is false | @@ -905,8 +971,14 @@ | test.cpp:293:6:293:19 | ... != ... | ... == ... != 0+0 when ... != ... is true | | test.cpp:293:6:293:19 | ... != ... | ... == ... == 0 when ... != ... is false | | test.cpp:293:6:293:19 | ... != ... | ... == ... == 0+0 when ... != ... is false | +| test.cpp:293:6:293:19 | ... != ... | a != 42 when ... != ... is false | +| test.cpp:293:6:293:19 | ... != ... | a != 42+0 when ... != ... is false | +| test.cpp:293:6:293:19 | ... != ... | a == 42 when ... != ... is true | +| test.cpp:293:6:293:19 | ... != ... | a == 42+0 when ... != ... is true | | test.cpp:300:6:300:19 | ... == ... | 0 != ... != ...+0 when ... == ... is false | | test.cpp:300:6:300:19 | ... == ... | 0 == ... != ...+0 when ... == ... is true | +| test.cpp:300:6:300:19 | ... == ... | 42 != a+0 when ... == ... is false | +| test.cpp:300:6:300:19 | ... == ... | 42 == a+0 when ... == ... is true | | test.cpp:300:6:300:19 | ... == ... | ... != ... != 0 when ... == ... is false | | test.cpp:300:6:300:19 | ... == ... | ... != ... != 0+0 when ... == ... is false | | test.cpp:300:6:300:19 | ... == ... | ... != ... == 0 when ... == ... is true | @@ -915,16 +987,28 @@ | test.cpp:300:6:300:19 | ... == ... | ... == ... != 1 when ... == ... is false | | test.cpp:300:6:300:19 | ... == ... | ... == ... == 0 when ... == ... is false | | test.cpp:300:6:300:19 | ... == ... | ... == ... == 1 when ... == ... is true | +| test.cpp:300:6:300:19 | ... == ... | a != 42 when ... == ... is false | +| test.cpp:300:6:300:19 | ... == ... | a != 42+0 when ... == ... is false | +| test.cpp:300:6:300:19 | ... == ... | a == 42 when ... == ... is true | +| test.cpp:300:6:300:19 | ... == ... | a == 42+0 when ... == ... is true | | test.cpp:306:6:306:19 | ... != ... | 0 != ... != ...+0 when ... != ... is true | | test.cpp:306:6:306:19 | ... != ... | 0 == ... != ...+0 when ... != ... is false | +| test.cpp:306:6:306:19 | ... != ... | 42 != a+0 when ... != ... is true | +| test.cpp:306:6:306:19 | ... != ... | 42 == a+0 when ... != ... is false | | test.cpp:306:6:306:19 | ... != ... | ... != ... != 0 when ... != ... is true | | test.cpp:306:6:306:19 | ... != ... | ... != ... != 0+0 when ... != ... is true | | test.cpp:306:6:306:19 | ... != ... | ... != ... != 1 when ... != ... is false | | test.cpp:306:6:306:19 | ... != ... | ... != ... == 0 when ... != ... is false | | test.cpp:306:6:306:19 | ... != ... | ... != ... == 0+0 when ... != ... is false | | test.cpp:306:6:306:19 | ... != ... | ... != ... == 1 when ... != ... is true | +| test.cpp:306:6:306:19 | ... != ... | a != 42 when ... != ... is true | +| test.cpp:306:6:306:19 | ... != ... | a != 42+0 when ... != ... is true | +| test.cpp:306:6:306:19 | ... != ... | a == 42 when ... != ... is false | +| test.cpp:306:6:306:19 | ... != ... | a == 42+0 when ... != ... is false | | test.cpp:312:6:312:18 | ... == ... | 0 != ... < ...+0 when ... == ... is false | | test.cpp:312:6:312:18 | ... == ... | 0 == ... < ...+0 when ... == ... is true | +| test.cpp:312:6:312:18 | ... == ... | 42 < a+1 when ... == ... is true | +| test.cpp:312:6:312:18 | ... == ... | 42 >= a+1 when ... == ... is false | | test.cpp:312:6:312:18 | ... == ... | ... < ... != 0 when ... == ... is false | | test.cpp:312:6:312:18 | ... == ... | ... < ... != 0+0 when ... == ... is false | | test.cpp:312:6:312:18 | ... == ... | ... < ... == 0 when ... == ... is true | @@ -933,8 +1017,14 @@ | test.cpp:312:6:312:18 | ... == ... | ... == ... != 1 when ... == ... is false | | test.cpp:312:6:312:18 | ... == ... | ... == ... == 0 when ... == ... is false | | test.cpp:312:6:312:18 | ... == ... | ... == ... == 1 when ... == ... is true | +| test.cpp:312:6:312:18 | ... == ... | a < 42 when ... == ... is false | +| test.cpp:312:6:312:18 | ... == ... | a < 42+0 when ... == ... is false | +| test.cpp:312:6:312:18 | ... == ... | a >= 42 when ... == ... is true | +| test.cpp:312:6:312:18 | ... == ... | a >= 42+0 when ... == ... is true | | test.cpp:318:6:318:18 | ... != ... | 0 != ... < ...+0 when ... != ... is true | | test.cpp:318:6:318:18 | ... != ... | 0 == ... < ...+0 when ... != ... is false | +| test.cpp:318:6:318:18 | ... != ... | 42 < a+1 when ... != ... is false | +| test.cpp:318:6:318:18 | ... != ... | 42 >= a+1 when ... != ... is true | | test.cpp:318:6:318:18 | ... != ... | ... != ... != 0 when ... != ... is true | | test.cpp:318:6:318:18 | ... != ... | ... != ... != 1 when ... != ... is false | | test.cpp:318:6:318:18 | ... != ... | ... != ... == 0 when ... != ... is false | @@ -943,3 +1033,7 @@ | test.cpp:318:6:318:18 | ... != ... | ... < ... != 0+0 when ... != ... is true | | test.cpp:318:6:318:18 | ... != ... | ... < ... == 0 when ... != ... is false | | test.cpp:318:6:318:18 | ... != ... | ... < ... == 0+0 when ... != ... is false | +| test.cpp:318:6:318:18 | ... != ... | a < 42 when ... != ... is true | +| test.cpp:318:6:318:18 | ... != ... | a < 42+0 when ... != ... is true | +| test.cpp:318:6:318:18 | ... != ... | a >= 42 when ... != ... is false | +| test.cpp:318:6:318:18 | ... != ... | a >= 42+0 when ... != ... is false | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected index 0c4f981ac03..c9f52e5f190 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected @@ -179,6 +179,22 @@ binary | test.c:182:10:182:33 | ... && ... | test.c:182:31:182:33 | 1.0 | >= | test.c:182:25:182:27 | foo | 1 | test.c:181:25:182:20 | { ... } | | test.c:182:25:182:33 | ... < ... | test.c:182:25:182:27 | foo | < | test.c:182:31:182:33 | 1.0 | 0 | test.c:181:25:182:20 | { ... } | | test.c:182:25:182:33 | ... < ... | test.c:182:31:182:33 | 1.0 | >= | test.c:182:25:182:27 | foo | 1 | test.c:181:25:182:20 | { ... } | +| test.c:190:7:190:8 | ! ... | test.c:188:11:188:11 | a | == | test.c:188:16:188:16 | b | 0 | test.c:190:11:192:3 | { ... } | +| test.c:190:7:190:8 | ! ... | test.c:188:16:188:16 | b | == | test.c:188:11:188:11 | a | 0 | test.c:190:11:192:3 | { ... } | +| test.c:190:8:190:8 | c | test.c:188:11:188:11 | a | == | test.c:188:16:188:16 | b | 0 | test.c:190:11:192:3 | { ... } | +| test.c:190:8:190:8 | c | test.c:188:16:188:16 | b | == | test.c:188:11:188:11 | a | 0 | test.c:190:11:192:3 | { ... } | +| test.c:198:7:198:8 | ! ... | test.c:196:11:196:11 | a | < | test.c:196:15:196:16 | 10 | 1 | test.c:198:11:200:3 | { ... } | +| test.c:198:7:198:8 | ! ... | test.c:196:15:196:16 | 10 | >= | test.c:196:11:196:11 | a | 0 | test.c:198:11:200:3 | { ... } | +| test.c:198:8:198:8 | b | test.c:196:11:196:11 | a | < | test.c:196:15:196:16 | 10 | 1 | test.c:198:11:200:3 | { ... } | +| test.c:198:8:198:8 | b | test.c:196:15:196:16 | 10 | >= | test.c:196:11:196:11 | a | 0 | test.c:198:11:200:3 | { ... } | +| test.c:206:7:206:8 | ! ... | test.c:204:11:204:11 | a | < | test.c:204:15:204:15 | b | 1 | test.c:206:11:208:3 | { ... } | +| test.c:206:7:206:8 | ! ... | test.c:204:15:204:15 | b | >= | test.c:204:11:204:11 | a | 0 | test.c:206:11:208:3 | { ... } | +| test.c:206:8:206:8 | c | test.c:204:11:204:11 | a | < | test.c:204:15:204:15 | b | 1 | test.c:206:11:208:3 | { ... } | +| test.c:206:8:206:8 | c | test.c:204:15:204:15 | b | >= | test.c:204:11:204:11 | a | 0 | test.c:206:11:208:3 | { ... } | +| test.c:215:6:215:18 | call to __builtin_expect | test.c:215:13:215:13 | a | >= | test.c:215:17:215:17 | b | 1 | test.c:215:21:217:5 | { ... } | +| test.c:215:6:215:18 | call to __builtin_expect | test.c:215:17:215:17 | b | < | test.c:215:13:215:13 | a | 0 | test.c:215:21:217:5 | { ... } | +| test.c:219:9:219:22 | call to __builtin_expect | test.c:219:16:219:16 | a | >= | test.c:219:20:219:21 | 42 | 1 | test.c:219:25:221:5 | { ... } | +| test.c:219:9:219:22 | call to __builtin_expect | test.c:219:20:219:21 | 42 | < | test.c:219:16:219:16 | a | 0 | test.c:219:25:221:5 | { ... } | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | test.cpp:31:12:31:13 | - ... | 0 | test.cpp:30:6:30:16 | doSomething | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | test.cpp:31:12:31:13 | - ... | 0 | test.cpp:34:1:34:1 | return ... | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | == | test.cpp:31:12:31:13 | - ... | 0 | test.cpp:30:6:30:16 | doSomething | @@ -315,52 +331,148 @@ binary | test.cpp:241:35:241:43 | ... == ... | test.cpp:241:17:241:17 | 0 | == | test.cpp:241:12:241:12 | i | 0 | test.cpp:241:46:242:13 | { ... } | | test.cpp:241:35:241:43 | ... == ... | test.cpp:241:38:241:38 | i | == | test.cpp:241:43:241:43 | 0 | 0 | test.cpp:241:46:242:13 | { ... } | | test.cpp:241:35:241:43 | ... == ... | test.cpp:241:43:241:43 | 0 | == | test.cpp:241:38:241:38 | i | 0 | test.cpp:241:46:242:13 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:7 | a | != | test.cpp:247:12:247:12 | b | 0 | test.cpp:247:21:249:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:7 | a | == | test.cpp:247:12:247:12 | b | 0 | test.cpp:249:10:251:3 | { ... } | | test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:12 | ... == ... | != | test.cpp:247:18:247:18 | 0 | 0 | test.cpp:249:10:251:3 | { ... } | | test.cpp:247:6:247:18 | ... == ... | test.cpp:247:7:247:12 | ... == ... | == | test.cpp:247:18:247:18 | 0 | 0 | test.cpp:247:21:249:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:12:247:12 | b | != | test.cpp:247:7:247:7 | a | 0 | test.cpp:247:21:249:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:247:12:247:12 | b | == | test.cpp:247:7:247:7 | a | 0 | test.cpp:249:10:251:3 | { ... } | | test.cpp:247:6:247:18 | ... == ... | test.cpp:247:18:247:18 | 0 | != | test.cpp:247:7:247:12 | ... == ... | 0 | test.cpp:249:10:251:3 | { ... } | | test.cpp:247:6:247:18 | ... == ... | test.cpp:247:18:247:18 | 0 | == | test.cpp:247:7:247:12 | ... == ... | 0 | test.cpp:247:21:249:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:253:7:253:7 | a | != | test.cpp:253:12:253:12 | b | 0 | test.cpp:247:21:249:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:253:7:253:7 | a | == | test.cpp:253:12:253:12 | b | 0 | test.cpp:249:10:251:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:253:12:253:12 | b | != | test.cpp:253:7:253:7 | a | 0 | test.cpp:247:21:249:3 | { ... } | +| test.cpp:247:6:247:18 | ... == ... | test.cpp:253:12:253:12 | b | == | test.cpp:253:7:253:7 | a | 0 | test.cpp:249:10:251:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:247:7:247:7 | a | != | test.cpp:247:12:247:12 | b | 0 | test.cpp:255:10:257:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:247:7:247:7 | a | == | test.cpp:247:12:247:12 | b | 0 | test.cpp:253:21:255:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:247:12:247:12 | b | != | test.cpp:247:7:247:7 | a | 0 | test.cpp:255:10:257:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:247:12:247:12 | b | == | test.cpp:247:7:247:7 | a | 0 | test.cpp:253:21:255:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:7 | a | != | test.cpp:253:12:253:12 | b | 0 | test.cpp:255:10:257:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:7 | a | == | test.cpp:253:12:253:12 | b | 0 | test.cpp:253:21:255:3 | { ... } | | test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:12 | ... == ... | != | test.cpp:253:18:253:18 | 0 | 0 | test.cpp:253:21:255:3 | { ... } | | test.cpp:253:6:253:18 | ... != ... | test.cpp:253:7:253:12 | ... == ... | == | test.cpp:253:18:253:18 | 0 | 0 | test.cpp:255:10:257:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:12:253:12 | b | != | test.cpp:253:7:253:7 | a | 0 | test.cpp:255:10:257:3 | { ... } | +| test.cpp:253:6:253:18 | ... != ... | test.cpp:253:12:253:12 | b | == | test.cpp:253:7:253:7 | a | 0 | test.cpp:253:21:255:3 | { ... } | | test.cpp:253:6:253:18 | ... != ... | test.cpp:253:18:253:18 | 0 | != | test.cpp:253:7:253:12 | ... == ... | 0 | test.cpp:253:21:255:3 | { ... } | | test.cpp:253:6:253:18 | ... != ... | test.cpp:253:18:253:18 | 0 | == | test.cpp:253:7:253:12 | ... == ... | 0 | test.cpp:255:10:257:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:7 | a | != | test.cpp:260:12:260:12 | b | 0 | test.cpp:262:10:264:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:7 | a | == | test.cpp:260:12:260:12 | b | 0 | test.cpp:260:21:262:3 | { ... } | | test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:12 | ... != ... | != | test.cpp:260:18:260:18 | 0 | 0 | test.cpp:262:10:264:3 | { ... } | | test.cpp:260:6:260:18 | ... == ... | test.cpp:260:7:260:12 | ... != ... | == | test.cpp:260:18:260:18 | 0 | 0 | test.cpp:260:21:262:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:12:260:12 | b | != | test.cpp:260:7:260:7 | a | 0 | test.cpp:262:10:264:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:260:12:260:12 | b | == | test.cpp:260:7:260:7 | a | 0 | test.cpp:260:21:262:3 | { ... } | | test.cpp:260:6:260:18 | ... == ... | test.cpp:260:18:260:18 | 0 | != | test.cpp:260:7:260:12 | ... != ... | 0 | test.cpp:262:10:264:3 | { ... } | | test.cpp:260:6:260:18 | ... == ... | test.cpp:260:18:260:18 | 0 | == | test.cpp:260:7:260:12 | ... != ... | 0 | test.cpp:260:21:262:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:266:7:266:7 | a | != | test.cpp:266:12:266:12 | b | 0 | test.cpp:262:10:264:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:266:7:266:7 | a | == | test.cpp:266:12:266:12 | b | 0 | test.cpp:260:21:262:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:266:12:266:12 | b | != | test.cpp:266:7:266:7 | a | 0 | test.cpp:262:10:264:3 | { ... } | +| test.cpp:260:6:260:18 | ... == ... | test.cpp:266:12:266:12 | b | == | test.cpp:266:7:266:7 | a | 0 | test.cpp:260:21:262:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:260:7:260:7 | a | != | test.cpp:260:12:260:12 | b | 0 | test.cpp:266:21:268:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:260:7:260:7 | a | == | test.cpp:260:12:260:12 | b | 0 | test.cpp:268:10:270:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:260:12:260:12 | b | != | test.cpp:260:7:260:7 | a | 0 | test.cpp:266:21:268:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:260:12:260:12 | b | == | test.cpp:260:7:260:7 | a | 0 | test.cpp:268:10:270:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:7 | a | != | test.cpp:266:12:266:12 | b | 0 | test.cpp:266:21:268:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:7 | a | == | test.cpp:266:12:266:12 | b | 0 | test.cpp:268:10:270:3 | { ... } | | test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:12 | ... != ... | != | test.cpp:266:18:266:18 | 0 | 0 | test.cpp:266:21:268:3 | { ... } | | test.cpp:266:6:266:18 | ... != ... | test.cpp:266:7:266:12 | ... != ... | == | test.cpp:266:18:266:18 | 0 | 0 | test.cpp:268:10:270:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:12:266:12 | b | != | test.cpp:266:7:266:7 | a | 0 | test.cpp:266:21:268:3 | { ... } | +| test.cpp:266:6:266:18 | ... != ... | test.cpp:266:12:266:12 | b | == | test.cpp:266:7:266:7 | a | 0 | test.cpp:268:10:270:3 | { ... } | | test.cpp:266:6:266:18 | ... != ... | test.cpp:266:18:266:18 | 0 | != | test.cpp:266:7:266:12 | ... != ... | 0 | test.cpp:266:21:268:3 | { ... } | | test.cpp:266:6:266:18 | ... != ... | test.cpp:266:18:266:18 | 0 | == | test.cpp:266:7:266:12 | ... != ... | 0 | test.cpp:268:10:270:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:7 | a | < | test.cpp:273:11:273:11 | b | 0 | test.cpp:275:10:277:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:7 | a | >= | test.cpp:273:11:273:11 | b | 0 | test.cpp:273:20:275:3 | { ... } | | test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:11 | ... < ... | != | test.cpp:273:17:273:17 | 0 | 0 | test.cpp:275:10:277:3 | { ... } | | test.cpp:273:6:273:17 | ... == ... | test.cpp:273:7:273:11 | ... < ... | == | test.cpp:273:17:273:17 | 0 | 0 | test.cpp:273:20:275:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:11:273:11 | b | < | test.cpp:273:7:273:7 | a | 1 | test.cpp:273:20:275:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:273:11:273:11 | b | >= | test.cpp:273:7:273:7 | a | 1 | test.cpp:275:10:277:3 | { ... } | | test.cpp:273:6:273:17 | ... == ... | test.cpp:273:17:273:17 | 0 | != | test.cpp:273:7:273:11 | ... < ... | 0 | test.cpp:275:10:277:3 | { ... } | | test.cpp:273:6:273:17 | ... == ... | test.cpp:273:17:273:17 | 0 | == | test.cpp:273:7:273:11 | ... < ... | 0 | test.cpp:273:20:275:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:279:7:279:7 | a | < | test.cpp:279:11:279:11 | b | 0 | test.cpp:275:10:277:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:279:7:279:7 | a | >= | test.cpp:279:11:279:11 | b | 0 | test.cpp:273:20:275:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:279:11:279:11 | b | < | test.cpp:279:7:279:7 | a | 1 | test.cpp:273:20:275:3 | { ... } | +| test.cpp:273:6:273:17 | ... == ... | test.cpp:279:11:279:11 | b | >= | test.cpp:279:7:279:7 | a | 1 | test.cpp:275:10:277:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:273:7:273:7 | a | < | test.cpp:273:11:273:11 | b | 0 | test.cpp:279:20:281:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:273:7:273:7 | a | >= | test.cpp:273:11:273:11 | b | 0 | test.cpp:281:10:283:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:273:11:273:11 | b | < | test.cpp:273:7:273:7 | a | 1 | test.cpp:281:10:283:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:273:11:273:11 | b | >= | test.cpp:273:7:273:7 | a | 1 | test.cpp:279:20:281:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:7 | a | < | test.cpp:279:11:279:11 | b | 0 | test.cpp:279:20:281:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:7 | a | >= | test.cpp:279:11:279:11 | b | 0 | test.cpp:281:10:283:3 | { ... } | | test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:11 | ... < ... | != | test.cpp:279:17:279:17 | 0 | 0 | test.cpp:279:20:281:3 | { ... } | | test.cpp:279:6:279:17 | ... != ... | test.cpp:279:7:279:11 | ... < ... | == | test.cpp:279:17:279:17 | 0 | 0 | test.cpp:281:10:283:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:11:279:11 | b | < | test.cpp:279:7:279:7 | a | 1 | test.cpp:281:10:283:3 | { ... } | +| test.cpp:279:6:279:17 | ... != ... | test.cpp:279:11:279:11 | b | >= | test.cpp:279:7:279:7 | a | 1 | test.cpp:279:20:281:3 | { ... } | | test.cpp:279:6:279:17 | ... != ... | test.cpp:279:17:279:17 | 0 | != | test.cpp:279:7:279:11 | ... < ... | 0 | test.cpp:279:20:281:3 | { ... } | | test.cpp:279:6:279:17 | ... != ... | test.cpp:279:17:279:17 | 0 | == | test.cpp:279:7:279:11 | ... < ... | 0 | test.cpp:281:10:283:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:7 | a | != | test.cpp:287:12:287:13 | 42 | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:7 | a | == | test.cpp:287:12:287:13 | 42 | 0 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | != | test.cpp:287:19:287:19 | 0 | 0 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | == | test.cpp:287:19:287:19 | 0 | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:12:287:13 | 42 | != | test.cpp:287:7:287:7 | a | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:12:287:13 | 42 | == | test.cpp:287:7:287:7 | a | 0 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:19:287:19 | 0 | != | test.cpp:287:7:287:13 | ... == ... | 0 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:19:287:19 | 0 | == | test.cpp:287:7:287:13 | ... == ... | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:293:7:293:7 | a | != | test.cpp:293:12:293:13 | 42 | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:293:7:293:7 | a | == | test.cpp:293:12:293:13 | 42 | 0 | test.cpp:289:10:291:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:293:12:293:13 | 42 | != | test.cpp:293:7:293:7 | a | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:293:12:293:13 | 42 | == | test.cpp:293:7:293:7 | a | 0 | test.cpp:289:10:291:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:287:7:287:7 | a | != | test.cpp:287:12:287:13 | 42 | 0 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:287:7:287:7 | a | == | test.cpp:287:12:287:13 | 42 | 0 | test.cpp:293:22:295:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:287:12:287:13 | 42 | != | test.cpp:287:7:287:7 | a | 0 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:287:12:287:13 | 42 | == | test.cpp:287:7:287:7 | a | 0 | test.cpp:293:22:295:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:7 | a | != | test.cpp:293:12:293:13 | 42 | 0 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:7 | a | == | test.cpp:293:12:293:13 | 42 | 0 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | != | test.cpp:293:19:293:19 | 0 | 0 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | == | test.cpp:293:19:293:19 | 0 | 0 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:12:293:13 | 42 | != | test.cpp:293:7:293:7 | a | 0 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:12:293:13 | 42 | == | test.cpp:293:7:293:7 | a | 0 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:19:293:19 | 0 | != | test.cpp:293:7:293:13 | ... == ... | 0 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:19:293:19 | 0 | == | test.cpp:293:7:293:13 | ... == ... | 0 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:7 | a | != | test.cpp:300:12:300:13 | 42 | 0 | test.cpp:302:10:304:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:7 | a | == | test.cpp:300:12:300:13 | 42 | 0 | test.cpp:300:22:302:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | != | test.cpp:300:19:300:19 | 0 | 0 | test.cpp:302:10:304:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | == | test.cpp:300:19:300:19 | 0 | 0 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:12:300:13 | 42 | != | test.cpp:300:7:300:7 | a | 0 | test.cpp:302:10:304:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:12:300:13 | 42 | == | test.cpp:300:7:300:7 | a | 0 | test.cpp:300:22:302:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:19:300:19 | 0 | != | test.cpp:300:7:300:13 | ... != ... | 0 | test.cpp:302:10:304:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:19:300:19 | 0 | == | test.cpp:300:7:300:13 | ... != ... | 0 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:306:7:306:7 | a | != | test.cpp:306:12:306:13 | 42 | 0 | test.cpp:302:10:304:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:306:7:306:7 | a | == | test.cpp:306:12:306:13 | 42 | 0 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:306:12:306:13 | 42 | != | test.cpp:306:7:306:7 | a | 0 | test.cpp:302:10:304:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:306:12:306:13 | 42 | == | test.cpp:306:7:306:7 | a | 0 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:300:7:300:7 | a | != | test.cpp:300:12:300:13 | 42 | 0 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:300:7:300:7 | a | == | test.cpp:300:12:300:13 | 42 | 0 | test.cpp:308:10:310:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:300:12:300:13 | 42 | != | test.cpp:300:7:300:7 | a | 0 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:300:12:300:13 | 42 | == | test.cpp:300:7:300:7 | a | 0 | test.cpp:308:10:310:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:7 | a | != | test.cpp:306:12:306:13 | 42 | 0 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:7 | a | == | test.cpp:306:12:306:13 | 42 | 0 | test.cpp:308:10:310:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | != | test.cpp:306:19:306:19 | 0 | 0 | test.cpp:306:22:308:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | == | test.cpp:306:19:306:19 | 0 | 0 | test.cpp:308:10:310:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:12:306:13 | 42 | != | test.cpp:306:7:306:7 | a | 0 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:12:306:13 | 42 | == | test.cpp:306:7:306:7 | a | 0 | test.cpp:308:10:310:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:19:306:19 | 0 | != | test.cpp:306:7:306:13 | ... != ... | 0 | test.cpp:306:22:308:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:19:306:19 | 0 | == | test.cpp:306:7:306:13 | ... != ... | 0 | test.cpp:308:10:310:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:7 | a | < | test.cpp:312:11:312:12 | 42 | 0 | test.cpp:314:10:316:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:7 | a | >= | test.cpp:312:11:312:12 | 42 | 0 | test.cpp:312:21:314:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | != | test.cpp:312:18:312:18 | 0 | 0 | test.cpp:314:10:316:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | == | test.cpp:312:18:312:18 | 0 | 0 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:11:312:12 | 42 | < | test.cpp:312:7:312:7 | a | 1 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:11:312:12 | 42 | >= | test.cpp:312:7:312:7 | a | 1 | test.cpp:314:10:316:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:18:312:18 | 0 | != | test.cpp:312:7:312:12 | ... < ... | 0 | test.cpp:314:10:316:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:18:312:18 | 0 | == | test.cpp:312:7:312:12 | ... < ... | 0 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:318:7:318:7 | a | < | test.cpp:318:11:318:12 | 42 | 0 | test.cpp:314:10:316:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:318:7:318:7 | a | >= | test.cpp:318:11:318:12 | 42 | 0 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:318:11:318:12 | 42 | < | test.cpp:318:7:318:7 | a | 1 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:318:11:318:12 | 42 | >= | test.cpp:318:7:318:7 | a | 1 | test.cpp:314:10:316:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:312:7:312:7 | a | < | test.cpp:312:11:312:12 | 42 | 0 | test.cpp:318:21:320:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:312:7:312:7 | a | >= | test.cpp:312:11:312:12 | 42 | 0 | test.cpp:320:10:322:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:312:11:312:12 | 42 | < | test.cpp:312:7:312:7 | a | 1 | test.cpp:320:10:322:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:312:11:312:12 | 42 | >= | test.cpp:312:7:312:7 | a | 1 | test.cpp:318:21:320:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:7 | a | < | test.cpp:318:11:318:12 | 42 | 0 | test.cpp:318:21:320:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:7 | a | >= | test.cpp:318:11:318:12 | 42 | 0 | test.cpp:320:10:322:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | != | test.cpp:318:18:318:18 | 0 | 0 | test.cpp:318:21:320:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | == | test.cpp:318:18:318:18 | 0 | 0 | test.cpp:320:10:322:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:11:318:12 | 42 | < | test.cpp:318:7:318:7 | a | 1 | test.cpp:320:10:322:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:11:318:12 | 42 | >= | test.cpp:318:7:318:7 | a | 1 | test.cpp:318:21:320:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:18:318:18 | 0 | != | test.cpp:318:7:318:12 | ... < ... | 0 | test.cpp:318:21:320:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:18:318:18 | 0 | == | test.cpp:318:7:318:12 | ... < ... | 0 | test.cpp:320:10:322:3 | { ... } | unary @@ -686,9 +798,11 @@ unary | test.c:190:8:190:8 | c | test.c:190:7:190:8 | ! ... | != | 0 | test.c:190:11:192:3 | { ... } | | test.c:190:8:190:8 | c | test.c:190:7:190:8 | ! ... | == | 1 | test.c:190:11:192:3 | { ... } | | test.c:190:8:190:8 | c | test.c:190:8:190:8 | c | == | 0 | test.c:190:11:192:3 | { ... } | +| test.c:198:7:198:8 | ! ... | test.c:196:11:196:11 | a | < | 11 | test.c:198:11:200:3 | { ... } | | test.c:198:7:198:8 | ! ... | test.c:198:7:198:8 | ! ... | != | 0 | test.c:198:11:200:3 | { ... } | | test.c:198:7:198:8 | ! ... | test.c:198:7:198:8 | ! ... | == | 1 | test.c:198:11:200:3 | { ... } | | test.c:198:7:198:8 | ! ... | test.c:198:8:198:8 | b | == | 0 | test.c:198:11:200:3 | { ... } | +| test.c:198:8:198:8 | b | test.c:196:11:196:11 | a | < | 11 | test.c:198:11:200:3 | { ... } | | test.c:198:8:198:8 | b | test.c:198:7:198:8 | ! ... | != | 0 | test.c:198:11:200:3 | { ... } | | test.c:198:8:198:8 | b | test.c:198:7:198:8 | ! ... | == | 1 | test.c:198:11:200:3 | { ... } | | test.c:198:8:198:8 | b | test.c:198:8:198:8 | b | == | 0 | test.c:198:11:200:3 | { ... } | @@ -700,8 +814,11 @@ unary | test.c:206:8:206:8 | c | test.c:206:8:206:8 | c | == | 0 | test.c:206:11:208:3 | { ... } | | test.c:215:6:215:18 | call to __builtin_expect | test.c:215:6:215:18 | call to __builtin_expect | != | 0 | test.c:215:21:217:5 | { ... } | | test.c:215:6:215:18 | call to __builtin_expect | test.c:215:6:215:18 | call to __builtin_expect | == | 1 | test.c:215:21:217:5 | { ... } | +| test.c:215:6:215:18 | call to __builtin_expect | test.c:215:13:215:17 | ... > ... | != | 0 | test.c:215:21:217:5 | { ... } | | test.c:219:9:219:22 | call to __builtin_expect | test.c:219:9:219:22 | call to __builtin_expect | != | 0 | test.c:219:25:221:5 | { ... } | | test.c:219:9:219:22 | call to __builtin_expect | test.c:219:9:219:22 | call to __builtin_expect | == | 1 | test.c:219:25:221:5 | { ... } | +| test.c:219:9:219:22 | call to __builtin_expect | test.c:219:16:219:16 | a | >= | 43 | test.c:219:25:221:5 | { ... } | +| test.c:219:9:219:22 | call to __builtin_expect | test.c:219:16:219:21 | ... > ... | != | 0 | test.c:219:25:221:5 | { ... } | | test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | != | 0 | test.cpp:19:5:19:14 | ExprStmt | | test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | == | 1 | test.cpp:19:5:19:14 | ExprStmt | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | test.cpp:30:6:30:16 | doSomething | @@ -1051,35 +1168,59 @@ unary | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | != | 1 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | == | 0 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:6:287:19 | ... == ... | == | 1 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:7 | a | != | 42 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:7 | a | == | 42 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | != | 0 | test.cpp:289:10:291:3 | { ... } | | test.cpp:287:6:287:19 | ... == ... | test.cpp:287:7:287:13 | ... == ... | == | 0 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:293:7:293:7 | a | != | 42 | test.cpp:287:22:289:3 | { ... } | +| test.cpp:287:6:287:19 | ... == ... | test.cpp:293:7:293:7 | a | == | 42 | test.cpp:289:10:291:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:287:7:287:7 | a | != | 42 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:287:7:287:7 | a | == | 42 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | != | 0 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | != | 1 | test.cpp:295:10:297:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | == | 0 | test.cpp:295:10:297:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:6:293:19 | ... != ... | == | 1 | test.cpp:293:22:295:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:7 | a | != | 42 | test.cpp:295:10:297:3 | { ... } | +| test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:7 | a | == | 42 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | != | 0 | test.cpp:293:22:295:3 | { ... } | | test.cpp:293:6:293:19 | ... != ... | test.cpp:293:7:293:13 | ... == ... | == | 0 | test.cpp:295:10:297:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | != | 0 | test.cpp:300:22:302:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | != | 1 | test.cpp:302:10:304:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | == | 0 | test.cpp:302:10:304:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:6:300:19 | ... == ... | == | 1 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:7 | a | != | 42 | test.cpp:302:10:304:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:7 | a | == | 42 | test.cpp:300:22:302:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | != | 0 | test.cpp:302:10:304:3 | { ... } | | test.cpp:300:6:300:19 | ... == ... | test.cpp:300:7:300:13 | ... != ... | == | 0 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:306:7:306:7 | a | != | 42 | test.cpp:302:10:304:3 | { ... } | +| test.cpp:300:6:300:19 | ... == ... | test.cpp:306:7:306:7 | a | == | 42 | test.cpp:300:22:302:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:300:7:300:7 | a | != | 42 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:300:7:300:7 | a | == | 42 | test.cpp:308:10:310:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | != | 0 | test.cpp:306:22:308:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | != | 1 | test.cpp:308:10:310:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | == | 0 | test.cpp:308:10:310:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:6:306:19 | ... != ... | == | 1 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:7 | a | != | 42 | test.cpp:306:22:308:3 | { ... } | +| test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:7 | a | == | 42 | test.cpp:308:10:310:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | != | 0 | test.cpp:306:22:308:3 | { ... } | | test.cpp:306:6:306:19 | ... != ... | test.cpp:306:7:306:13 | ... != ... | == | 0 | test.cpp:308:10:310:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | != | 0 | test.cpp:312:21:314:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | != | 1 | test.cpp:314:10:316:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | == | 0 | test.cpp:314:10:316:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:6:312:18 | ... == ... | == | 1 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:7 | a | < | 42 | test.cpp:314:10:316:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:7 | a | >= | 42 | test.cpp:312:21:314:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | != | 0 | test.cpp:314:10:316:3 | { ... } | | test.cpp:312:6:312:18 | ... == ... | test.cpp:312:7:312:12 | ... < ... | == | 0 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:318:7:318:7 | a | < | 42 | test.cpp:314:10:316:3 | { ... } | +| test.cpp:312:6:312:18 | ... == ... | test.cpp:318:7:318:7 | a | >= | 42 | test.cpp:312:21:314:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:312:7:312:7 | a | < | 42 | test.cpp:318:21:320:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:312:7:312:7 | a | >= | 42 | test.cpp:320:10:322:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | != | 0 | test.cpp:318:21:320:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | != | 1 | test.cpp:320:10:322:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | == | 0 | test.cpp:320:10:322:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:6:318:18 | ... != ... | == | 1 | test.cpp:318:21:320:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:7 | a | < | 42 | test.cpp:318:21:320:3 | { ... } | +| test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:7 | a | >= | 42 | test.cpp:320:10:322:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | != | 0 | test.cpp:318:21:320:3 | { ... } | | test.cpp:318:6:318:18 | ... != ... | test.cpp:318:7:318:12 | ... < ... | == | 0 | test.cpp:320:10:322:3 | { ... } | diff --git a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected index 05fa269aab4..6dfe60dcb8c 100644 --- a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected +++ b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected @@ -168,7 +168,6 @@ nodes | test.cpp:577:9:577:9 | i | semmle.label | i | subpaths #select -| test.c:11:7:11:7 | x | test.c:10:31:10:32 | sscanf output argument | test.c:11:7:11:7 | x | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.c:10:13:10:18 | call to sscanf | call to sscanf | | test.cpp:35:7:35:7 | i | test.cpp:34:15:34:16 | scanf output argument | test.cpp:35:7:35:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:34:3:34:7 | call to scanf | call to scanf | | test.cpp:68:7:68:7 | i | test.cpp:67:15:67:16 | scanf output argument | test.cpp:68:7:68:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:67:3:67:7 | call to scanf | call to scanf | | test.cpp:80:7:80:7 | i | test.cpp:79:15:79:16 | scanf output argument | test.cpp:80:7:80:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:79:3:79:7 | call to scanf | call to scanf | diff --git a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.c b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.c index 2a15082026d..dd1836949ff 100644 --- a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.c +++ b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.c @@ -8,6 +8,6 @@ void test_likely(const char* s, const char* format) int x; if (likely(sscanf(s, format, &x) == 1)) { - use(x); // GOOD [FALSE POSITIVE] + use(x); // GOOD } } \ No newline at end of file