Skip to content

Commit 0b81fbb

Browse files
committed
C++: Fixup tests.
1 parent 9ed8b75 commit 0b81fbb

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

cpp/ql/test/library-tests/controlflow/guards-ir/tests.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ query predicate astGuardsCompare(int startLine, string msg) {
2323
)
2424
)
2525
or
26-
exists(AbstractValue value |
26+
exists(GuardValue value |
2727
guard.comparesEq(left, k, true, value) and op = " == "
2828
or
2929
guard.comparesEq(left, k, false, value) and op = " != "
@@ -95,7 +95,7 @@ query predicate irGuardsCompare(int startLine, string msg) {
9595
)
9696
)
9797
or
98-
exists(AbstractValue value |
98+
exists(GuardValue value |
9999
guard.comparesLt(left, k, true, value) and op = " < "
100100
or
101101
guard.comparesLt(left, k, false, value) and op = " >= "

cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where
2727
)
2828
)
2929
or
30-
exists(AbstractValue value |
30+
exists(GuardValue value |
3131
guard.comparesLt(left, k, true, value) and op = " < "
3232
or
3333
guard.comparesLt(left, k, false, value) and op = " >= "

cpp/ql/test/library-tests/controlflow/guards/GuardsControl.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
import cpp
88
import semmle.code.cpp.controlflow.Guards
99

10-
from GuardCondition guard, AbstractValue value, BasicBlock block
10+
from GuardCondition guard, GuardValue value, BasicBlock block
1111
where guard.valueControls(block, value)
1212
select guard, value, block

cpp/ql/test/library-tests/dataflow/dataflow-tests/guard-condition-regression-test.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module IRTestAllocationConfig implements DataFlow::ConfigSig {
1717
}
1818

1919
predicate isBarrier(DataFlow::Node node) {
20-
exists(GuardCondition gc | node.asExpr() = gc.getAChild*())
20+
exists(GuardCondition gc | node.asExpr() = gc.(Expr).getAChild*())
2121
}
2222
}
2323

cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ predicate instructionGuardChecks(IRGuardCondition gc, Instruction checked, boole
77
exists(CallInstruction call |
88
call.getStaticCallTarget().hasName("checkArgument") and
99
checked = call.getAnArgument() and
10-
gc.comparesEq(call.getAUse(), 0, false, any(BooleanValue bv | bv.getValue() = branch))
10+
gc.comparesEq(call.getAUse(), 0, false, any(GuardValue bv | bv.asBooleanValue() = branch))
1111
)
1212
}
1313

0 commit comments

Comments
 (0)