Skip to content

Commit

Permalink
C++: Accept test changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasVP committed Nov 18, 2024
1 parent 657768d commit 06d9282
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 145 deletions.
76 changes: 39 additions & 37 deletions cpp/ql/test/library-tests/ir/ir/aliased_ir.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3321,9 +3321,9 @@ ir.c:
# 86| Block 2
# 86| r86_1(glval<int>) = VariableAddress[x1] :
# 86| r86_2(int) = Load[x1] : &:r86_1, m84_6
# 86| r86_3(int) = LogicalNot : r86_2
# 86| r86_4(int) = Constant[0] :
# 86| r86_5(bool) = CompareNE : r86_3, r86_4
# 86| r86_3(int) = Constant[0] :
# 86| r86_4(bool) = CompareNE : r86_2, r86_3
# 86| r86_5(bool) = LogicalNot : r86_4
# 86| v86_6(void) = ConditionalBranch : r86_5
#-----| False -> Block 4
#-----| True -> Block 3
Expand All @@ -3336,10 +3336,12 @@ ir.c:
# 88| r88_1(glval<int>) = VariableAddress[y] :
# 88| r88_2(glval<int>) = VariableAddress[x1] :
# 88| r88_3(int) = Load[x1] : &:r88_2, m84_6
# 88| r88_4(int) = LogicalNot : r88_3
# 88| m88_5(int) = Store[y] : &:r88_1, r88_4
# 88| r88_4(int) = Constant[0] :
# 88| r88_5(bool) = CompareNE : r88_3, r88_4
# 88| r88_6(bool) = LogicalNot : r88_5
# 88| m88_7(int) = Store[y] : &:r88_1, r88_6
# 89| r89_1(glval<int>) = VariableAddress[y] :
# 89| r89_2(int) = Load[y] : &:r89_1, m88_5
# 89| r89_2(int) = Load[y] : &:r89_1, m88_7
# 89| r89_3(int) = Constant[0] :
# 89| r89_4(bool) = CompareNE : r89_2, r89_3
# 89| v89_5(void) = ConditionalBranch : r89_4
Expand All @@ -3352,10 +3354,10 @@ ir.c:

# 90| Block 6
# 90| r90_1(glval<int>) = VariableAddress[y] :
# 90| r90_2(int) = Load[y] : &:r90_1, m88_5
# 90| r90_3(int) = LogicalNot : r90_2
# 90| r90_4(int) = Constant[0] :
# 90| r90_5(bool) = CompareNE : r90_3, r90_4
# 90| r90_2(int) = Load[y] : &:r90_1, m88_7
# 90| r90_3(int) = Constant[0] :
# 90| r90_4(bool) = CompareNE : r90_2, r90_3
# 90| r90_5(bool) = LogicalNot : r90_4
# 90| v90_6(void) = ConditionalBranch : r90_5
#-----| False -> Block 8
#-----| True -> Block 7
Expand Down Expand Up @@ -3389,9 +3391,9 @@ ir.c:
# 93| Block 11
# 93| r93_1(glval<int>) = VariableAddress[x1] :
# 93| r93_2(int) = Load[x1] : &:r93_1, m84_6
# 93| r93_3(int) = LogicalNot : r93_2
# 93| r93_4(int) = Constant[0] :
# 93| r93_5(bool) = CompareNE : r93_3, r93_4
# 93| r93_3(int) = Constant[0] :
# 93| r93_4(bool) = CompareNE : r93_2, r93_3
# 93| r93_5(bool) = LogicalNot : r93_4
# 93| v93_6(void) = ConditionalBranch : r93_5
#-----| False -> Block 14
#-----| True -> Block 12
Expand Down Expand Up @@ -3421,9 +3423,9 @@ ir.c:
# 94| Block 15
# 94| r94_6(glval<int>) = VariableAddress[x2] :
# 94| r94_7(int) = Load[x2] : &:r94_6, m84_8
# 94| r94_8(int) = LogicalNot : r94_7
# 94| r94_9(int) = Constant[0] :
# 94| r94_10(bool) = CompareNE : r94_8, r94_9
# 94| r94_8(int) = Constant[0] :
# 94| r94_9(bool) = CompareNE : r94_7, r94_8
# 94| r94_10(bool) = LogicalNot : r94_9
# 94| v94_11(void) = ConditionalBranch : r94_10
#-----| False -> Block 17
#-----| True -> Block 16
Expand All @@ -3435,19 +3437,19 @@ ir.c:
# 95| Block 17
# 95| r95_1(glval<int>) = VariableAddress[x1] :
# 95| r95_2(int) = Load[x1] : &:r95_1, m84_6
# 95| r95_3(int) = LogicalNot : r95_2
# 95| r95_4(int) = Constant[0] :
# 95| r95_5(bool) = CompareNE : r95_3, r95_4
# 95| r95_3(int) = Constant[0] :
# 95| r95_4(bool) = CompareNE : r95_2, r95_3
# 95| r95_5(bool) = LogicalNot : r95_4
# 95| v95_6(void) = ConditionalBranch : r95_5
#-----| False -> Block 20
#-----| True -> Block 18

# 95| Block 18
# 95| r95_7(glval<int>) = VariableAddress[x2] :
# 95| r95_8(int) = Load[x2] : &:r95_7, m84_8
# 95| r95_9(int) = LogicalNot : r95_8
# 95| r95_10(int) = Constant[0] :
# 95| r95_11(bool) = CompareNE : r95_9, r95_10
# 95| r95_9(int) = Constant[0] :
# 95| r95_10(bool) = CompareNE : r95_8, r95_9
# 95| r95_11(bool) = LogicalNot : r95_10
# 95| v95_12(void) = ConditionalBranch : r95_11
#-----| False -> Block 20
#-----| True -> Block 19
Expand Down Expand Up @@ -3481,9 +3483,9 @@ ir.c:
# 97| Block 23
# 97| r97_1(glval<int>) = VariableAddress[x1] :
# 97| r97_2(int) = Load[x1] : &:r97_1, m84_6
# 97| r97_3(int) = LogicalNot : r97_2
# 97| r97_4(int) = Constant[0] :
# 97| r97_5(bool) = CompareNE : r97_3, r97_4
# 97| r97_3(int) = Constant[0] :
# 97| r97_4(bool) = CompareNE : r97_2, r97_3
# 97| r97_5(bool) = LogicalNot : r97_4
# 97| v97_6(void) = ConditionalBranch : r97_5
#-----| False -> Block 24
#-----| True -> Block 25
Expand Down Expand Up @@ -3513,9 +3515,9 @@ ir.c:
# 98| Block 27
# 98| r98_6(glval<int>) = VariableAddress[x2] :
# 98| r98_7(int) = Load[x2] : &:r98_6, m84_8
# 98| r98_8(int) = LogicalNot : r98_7
# 98| r98_9(int) = Constant[0] :
# 98| r98_10(bool) = CompareNE : r98_8, r98_9
# 98| r98_8(int) = Constant[0] :
# 98| r98_9(bool) = CompareNE : r98_7, r98_8
# 98| r98_10(bool) = LogicalNot : r98_9
# 98| v98_11(void) = ConditionalBranch : r98_10
#-----| False -> Block 29
#-----| True -> Block 28
Expand All @@ -3527,19 +3529,19 @@ ir.c:
# 99| Block 29
# 99| r99_1(glval<int>) = VariableAddress[x1] :
# 99| r99_2(int) = Load[x1] : &:r99_1, m84_6
# 99| r99_3(int) = LogicalNot : r99_2
# 99| r99_4(int) = Constant[0] :
# 99| r99_5(bool) = CompareNE : r99_3, r99_4
# 99| r99_3(int) = Constant[0] :
# 99| r99_4(bool) = CompareNE : r99_2, r99_3
# 99| r99_5(bool) = LogicalNot : r99_4
# 99| v99_6(void) = ConditionalBranch : r99_5
#-----| False -> Block 30
#-----| True -> Block 31

# 99| Block 30
# 99| r99_7(glval<int>) = VariableAddress[x2] :
# 99| r99_8(int) = Load[x2] : &:r99_7, m84_8
# 99| r99_9(int) = LogicalNot : r99_8
# 99| r99_10(int) = Constant[0] :
# 99| r99_11(bool) = CompareNE : r99_9, r99_10
# 99| r99_9(int) = Constant[0] :
# 99| r99_10(bool) = CompareNE : r99_8, r99_9
# 99| r99_11(bool) = LogicalNot : r99_10
# 99| v99_12(void) = ConditionalBranch : r99_11
#-----| False -> Block 32
#-----| True -> Block 31
Expand Down Expand Up @@ -3599,9 +3601,9 @@ ir.c:
# 103| Block 38
# 103| r103_1(glval<int>) = VariableAddress[x_1_and_2] :
# 103| r103_2(int) = Load[x_1_and_2] : &:r103_1, m101_13
# 103| r103_3(int) = LogicalNot : r103_2
# 103| r103_4(int) = Constant[0] :
# 103| r103_5(bool) = CompareNE : r103_3, r103_4
# 103| r103_3(int) = Constant[0] :
# 103| r103_4(bool) = CompareNE : r103_2, r103_3
# 103| r103_5(bool) = LogicalNot : r103_4
# 103| v103_6(void) = ConditionalBranch : r103_5
#-----| False -> Block 40
#-----| True -> Block 39
Expand Down
12 changes: 0 additions & 12 deletions cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,4 @@ thisArgumentIsNonPointer
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
nonUniqueIRVariable
nonBooleanOperand
| ir.c:86:6:86:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:88:11:88:13 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:90:6:90:7 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:93:6:93:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:94:12:94:14 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:95:6:95:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:95:13:95:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:97:6:97:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:98:12:98:14 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:99:6:99:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:99:13:99:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:103:6:103:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
missingCppType
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,4 @@ thisArgumentIsNonPointer
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
nonUniqueIRVariable
nonBooleanOperand
| ir.c:86:6:86:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:88:11:88:13 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:90:6:90:7 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:93:6:93:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:94:12:94:14 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:95:6:95:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:95:13:95:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:97:6:97:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:98:12:98:14 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:99:6:99:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:99:13:99:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:103:6:103:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
missingCppType
12 changes: 0 additions & 12 deletions cpp/ql/test/library-tests/ir/ir/raw_consistency.expected
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,4 @@ thisArgumentIsNonPointer
| ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) |
nonUniqueIRVariable
nonBooleanOperand
| ir.c:86:6:86:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:88:11:88:13 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:90:6:90:7 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:93:6:93:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:94:12:94:14 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:95:6:95:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:95:13:95:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:97:6:97:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:98:12:98:14 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:99:6:99:8 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:99:13:99:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
| ir.c:103:6:103:15 | LogicalNot: ! ... | Logical Not instruction LogicalNot: ! ... with non-Boolean operand, in function '$@'. | ir.c:84:6:84:28 | void branch_on_integral_in_c(int, int) | void branch_on_integral_in_c(int, int) |
missingCppType
Loading

0 comments on commit 06d9282

Please sign in to comment.