Skip to content

Commit ea9e4b3

Browse files
committed
C++: Make a test slightly more verbose to catch this issue in the future.
1 parent d36350a commit ea9e4b3

File tree

1 file changed

+4
-1
lines changed
  • cpp/ql/test/library-tests/dataflow/ir-barrier-guards

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ predicate instructionGuardChecks(IRGuardCondition gc, Instruction checked, boole
1515
module BarrierGuard = DataFlow::InstructionBarrierGuard<instructionGuardChecks/3>;
1616

1717
predicate indirectBarrierGuard(DataFlow::Node node, string s) {
18-
node = BarrierGuard::getAnIndirectBarrierNode(_) and
18+
// This any(...) could technically be removed, but it helps us verify that we don't
19+
// accidentially change the API of this predicate (for instance, by having
20+
// the column be a unit parameter).
21+
node = BarrierGuard::getAnIndirectBarrierNode(any(int indirectionIndex)) and
1922
if node.isGLValue()
2023
then s = "glval<" + node.getType().toString().replaceAll(" ", "") + ">"
2124
else s = node.getType().toString().replaceAll(" ", "")

0 commit comments

Comments
 (0)