Skip to content

Commit d1e1037

Browse files
committed
C++: Accept test changes.
1 parent 92e814b commit d1e1037

File tree

6 files changed

+230
-141
lines changed

6 files changed

+230
-141
lines changed

cpp/ql/test/library-tests/ir/ir/aliased_ir.expected

Lines changed: 157 additions & 133 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ missingOperand
22
unexpectedOperand
33
duplicateOperand
44
missingPhiOperand
5+
| ir.cpp:2670:3:2670:9 | Phi: call to use_int | Instruction 'Phi: call to use_int' is missing an operand for predecessor block 'EnterFunction: phi_with_single_input_at_merge' in function '$@'. | ir.cpp:2663:13:2663:42 | void phi_with_single_input_at_merge(bool) | void phi_with_single_input_at_merge(bool) |
56
missingOperandType
7+
| ir.cpp:2602:19:2602:23 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
8+
| ir.cpp:2618:6:2618:21 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
9+
| ir.cpp:2639:13:2639:43 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
10+
| ir.cpp:2684:6:2684:9 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
611
duplicateChiOperand
712
sideEffectWithoutPrimary
813
instructionWithoutSuccessor
@@ -23,6 +28,34 @@ useNotDominatedByDefinition
2328
switchInstructionWithoutDefaultEdge
2429
notMarkedAsConflated
2530
wronglyMarkedAsConflated
31+
| ir.cpp:2602:19:2602:23 | Chi: merge | Instruction 'Chi: merge' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
32+
| ir.cpp:2602:36:2602:36 | Chi: a | Instruction 'Chi: a' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
33+
| ir.cpp:2604:14:2604:14 | Chi: definition of b | Instruction 'Chi: definition of b' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
34+
| ir.cpp:2607:10:2607:19 | Chi: call to predicateA | Instruction 'Chi: call to predicateA' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
35+
| ir.cpp:2607:10:2607:19 | Phi: call to predicateA | Instruction 'Phi: call to predicateA' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
36+
| ir.cpp:2609:5:2609:10 | Chi: ... = ... | Instruction 'Chi: ... = ...' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
37+
| ir.cpp:2618:6:2618:21 | Chi: escaping_pointer | Instruction 'Chi: escaping_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
38+
| ir.cpp:2621:7:2621:8 | Chi: definition of l1 | Instruction 'Chi: definition of l1' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
39+
| ir.cpp:2621:11:2621:12 | Chi: definition of l2 | Instruction 'Chi: definition of l2' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
40+
| ir.cpp:2630:3:2630:15 | Chi: call to use_const_int | Instruction 'Chi: call to use_const_int' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
41+
| ir.cpp:2639:13:2639:43 | Chi: needs_chi_for_initialize_groups | Instruction 'Chi: needs_chi_for_initialize_groups' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
42+
| ir.cpp:2641:7:2641:16 | Chi: call to predicateA | Instruction 'Chi: call to predicateA' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
43+
| ir.cpp:2643:32:2643:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
44+
| ir.cpp:2643:32:2643:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
45+
| ir.cpp:2646:25:2646:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
46+
| ir.cpp:2646:25:2646:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
47+
| ir.cpp:2648:5:2648:26 | Chi: call to use_const_void_pointer | Instruction 'Chi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
48+
| ir.cpp:2648:5:2648:26 | Phi: call to use_const_void_pointer | Instruction 'Phi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
49+
| ir.cpp:2652:32:2652:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
50+
| ir.cpp:2652:32:2652:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
51+
| ir.cpp:2655:25:2655:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
52+
| ir.cpp:2655:25:2655:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
53+
| ir.cpp:2657:5:2657:26 | Chi: call to use_const_void_pointer | Instruction 'Chi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
54+
| ir.cpp:2657:5:2657:26 | Phi: call to use_const_void_pointer | Instruction 'Phi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
55+
| ir.cpp:2659:1:2659:1 | Phi: return ... | Instruction 'Phi: return ...' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
56+
| ir.cpp:2684:6:2684:9 | Chi: test | Instruction 'Chi: test' should not be marked as having a conflated result in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
57+
| ir.cpp:2686:3:2686:29 | Chi: call to use | Instruction 'Chi: call to use' should not be marked as having a conflated result in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
58+
| ir.cpp:2686:3:2686:29 | Chi: call to use | Instruction 'Chi: call to use' should not be marked as having a conflated result in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
2659
invalidOverlap
2760
nonUniqueEnclosingIRFunction
2861
fieldAddressOnNonPointer

cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ missingOperand
22
unexpectedOperand
33
duplicateOperand
44
missingPhiOperand
5+
| ir.cpp:2670:3:2670:9 | Phi: call to use_int | Instruction 'Phi: call to use_int' is missing an operand for predecessor block 'EnterFunction: phi_with_single_input_at_merge' in function '$@'. | ir.cpp:2663:13:2663:42 | void phi_with_single_input_at_merge(bool) | void phi_with_single_input_at_merge(bool) |
56
missingOperandType
7+
| ir.cpp:2602:19:2602:23 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
8+
| ir.cpp:2618:6:2618:21 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
9+
| ir.cpp:2639:13:2639:43 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
10+
| ir.cpp:2684:6:2684:9 | ChiTotal | Operand 'ChiTotal' of instruction 'Chi' is missing a type in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
611
duplicateChiOperand
712
sideEffectWithoutPrimary
813
instructionWithoutSuccessor
@@ -23,6 +28,34 @@ useNotDominatedByDefinition
2328
switchInstructionWithoutDefaultEdge
2429
notMarkedAsConflated
2530
wronglyMarkedAsConflated
31+
| ir.cpp:2602:19:2602:23 | Chi: merge | Instruction 'Chi: merge' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
32+
| ir.cpp:2602:36:2602:36 | Chi: a | Instruction 'Chi: a' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
33+
| ir.cpp:2604:14:2604:14 | Chi: definition of b | Instruction 'Chi: definition of b' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
34+
| ir.cpp:2607:10:2607:19 | Chi: call to predicateA | Instruction 'Chi: call to predicateA' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
35+
| ir.cpp:2607:10:2607:19 | Phi: call to predicateA | Instruction 'Phi: call to predicateA' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
36+
| ir.cpp:2609:5:2609:10 | Chi: ... = ... | Instruction 'Chi: ... = ...' should not be marked as having a conflated result in function '$@'. | ir.cpp:2602:19:2602:23 | Recursive* merge(Recursive*) | Recursive* merge(Recursive*) |
37+
| ir.cpp:2618:6:2618:21 | Chi: escaping_pointer | Instruction 'Chi: escaping_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
38+
| ir.cpp:2621:7:2621:8 | Chi: definition of l1 | Instruction 'Chi: definition of l1' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
39+
| ir.cpp:2621:11:2621:12 | Chi: definition of l2 | Instruction 'Chi: definition of l2' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
40+
| ir.cpp:2630:3:2630:15 | Chi: call to use_const_int | Instruction 'Chi: call to use_const_int' should not be marked as having a conflated result in function '$@'. | ir.cpp:2618:6:2618:21 | void escaping_pointer(bool) | void escaping_pointer(bool) |
41+
| ir.cpp:2639:13:2639:43 | Chi: needs_chi_for_initialize_groups | Instruction 'Chi: needs_chi_for_initialize_groups' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
42+
| ir.cpp:2641:7:2641:16 | Chi: call to predicateA | Instruction 'Chi: call to predicateA' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
43+
| ir.cpp:2643:32:2643:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
44+
| ir.cpp:2643:32:2643:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
45+
| ir.cpp:2646:25:2646:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
46+
| ir.cpp:2646:25:2646:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
47+
| ir.cpp:2648:5:2648:26 | Chi: call to use_const_void_pointer | Instruction 'Chi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
48+
| ir.cpp:2648:5:2648:26 | Phi: call to use_const_void_pointer | Instruction 'Phi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
49+
| ir.cpp:2652:32:2652:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
50+
| ir.cpp:2652:32:2652:37 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
51+
| ir.cpp:2655:25:2655:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
52+
| ir.cpp:2655:25:2655:30 | Chi: call to malloc | Instruction 'Chi: call to malloc' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
53+
| ir.cpp:2657:5:2657:26 | Chi: call to use_const_void_pointer | Instruction 'Chi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
54+
| ir.cpp:2657:5:2657:26 | Phi: call to use_const_void_pointer | Instruction 'Phi: call to use_const_void_pointer' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
55+
| ir.cpp:2659:1:2659:1 | Phi: return ... | Instruction 'Phi: return ...' should not be marked as having a conflated result in function '$@'. | ir.cpp:2639:13:2639:43 | void needs_chi_for_initialize_groups() | void needs_chi_for_initialize_groups() |
56+
| ir.cpp:2684:6:2684:9 | Chi: test | Instruction 'Chi: test' should not be marked as having a conflated result in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
57+
| ir.cpp:2686:3:2686:29 | Chi: call to use | Instruction 'Chi: call to use' should not be marked as having a conflated result in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
58+
| ir.cpp:2686:3:2686:29 | Chi: call to use | Instruction 'Chi: call to use' should not be marked as having a conflated result in function '$@'. | ir.cpp:2684:6:2684:9 | void test(bool) | void test(bool) |
2659
invalidOverlap
2760
nonUniqueEnclosingIRFunction
2861
fieldAddressOnNonPointer
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
testFailures
2-
failures
1+
ERROR: getAllocation() cannot be resolved for type SimpleSSA::MemoryLocation (points_to.ql:31,42-55)

cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ ssa.cpp:
381381
#-----| Goto -> Block 1
382382

383383
# 69| Block 1
384-
# 69| m69_1(unknown) = Phi : from 0:~m68_4, from 2:~m70_10
384+
# 69| m69_1(unknown) = Phi : from 0:m68_10, from 2:m70_10
385385
# 69| m69_2(char *) = Phi : from 0:m68_8, from 2:m70_6
386386
# 69| m69_3(int) = Phi : from 0:m68_6, from 2:m69_8
387387
# 69| r69_4(glval<int>) = VariableAddress[n] :
@@ -411,9 +411,9 @@ ssa.cpp:
411411

412412
# 71| Block 3
413413
# 71| v71_1(void) = NoOp :
414-
# 68| v68_11(void) = ReturnIndirection[p] : &:r68_9, m68_10
414+
# 68| v68_11(void) = ReturnIndirection[p] : &:r68_9, m69_1
415415
# 68| v68_12(void) = ReturnVoid :
416-
# 68| v68_13(void) = AliasedUse : ~m69_1
416+
# 68| v68_13(void) = AliasedUse : m68_3
417417
# 68| v68_14(void) = ExitFunction :
418418

419419
# 75| void ScalarPhi(bool)

cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ ssa.cpp:
381381
#-----| Goto -> Block 1
382382

383383
# 69| Block 1
384-
# 69| m69_1(unknown) = Phi : from 0:~m68_4, from 2:~m70_10
384+
# 69| m69_1(unknown) = Phi : from 0:m68_10, from 2:m70_10
385385
# 69| m69_2(char *) = Phi : from 0:m68_8, from 2:m70_6
386386
# 69| m69_3(int) = Phi : from 0:m68_6, from 2:m69_8
387387
# 69| r69_4(glval<int>) = VariableAddress[n] :
@@ -411,9 +411,9 @@ ssa.cpp:
411411

412412
# 71| Block 3
413413
# 71| v71_1(void) = NoOp :
414-
# 68| v68_11(void) = ReturnIndirection[p] : &:r68_9, m68_10
414+
# 68| v68_11(void) = ReturnIndirection[p] : &:r68_9, m69_1
415415
# 68| v68_12(void) = ReturnVoid :
416-
# 68| v68_13(void) = AliasedUse : ~m69_1
416+
# 68| v68_13(void) = AliasedUse : m68_3
417417
# 68| v68_14(void) = ExitFunction :
418418

419419
# 75| void ScalarPhi(bool)

0 commit comments

Comments
 (0)