Skip to content

Commit 33e3753

Browse files
committed
C++: Accept test changes.
1 parent 1dfd32e commit 33e3753

File tree

4 files changed

+52
-23
lines changed

4 files changed

+52
-23
lines changed

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

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -825,15 +825,40 @@ ir.c:
825825
# 25| v25_4(void) = Call[ExRaiseAccessViolation] : func:r25_1, 0:r25_3
826826
# 25| m25_5(unknown) = ^CallSideEffect : ~m21_4
827827
# 25| m25_6(unknown) = Chi : total:m21_4, partial:m25_5
828-
# 29| r29_1(glval<int>) = VariableAddress[#return] :
829-
# 29| r29_2(int) = Constant[0] :
830-
# 29| m29_3(int) = Store[#return] : &:r29_1, r29_2
831-
# 21| r21_7(glval<int>) = VariableAddress[#return] :
832-
# 21| v21_8(void) = ReturnValue : &:r21_7, m29_3
833-
# 21| v21_9(void) = AliasedUse : ~m25_6
834-
# 21| v21_10(void) = ExitFunction :
835-
836-
# 21| Block 1
828+
#-----| Exception -> Block 3
829+
830+
# 26| Block 1
831+
# 26| r26_1(int) = Constant[0] :
832+
# 26| r26_2(bool) = CompareEQ : r26_7, r26_1
833+
# 26| v26_3(void) = ConditionalBranch : r26_2
834+
#-----| False -> Block 2
835+
#-----| True -> Block 5
836+
837+
# 26| Block 2
838+
# 26| r26_4(int) = Constant[1] :
839+
# 26| r26_5(bool) = CompareEQ : r26_7, r26_4
840+
# 26| v26_6(void) = ConditionalBranch : r26_5
841+
#-----| False -> Block 5
842+
#-----| True -> Block 4
843+
844+
# 26| Block 3
845+
# 26| r26_7(int) = Constant[1] :
846+
# 26| r26_8(int) = Constant[-1] :
847+
# 26| r26_9(bool) = CompareEQ : r26_7, r26_8
848+
# 26| v26_10(void) = ConditionalBranch : r26_9
849+
#-----| False -> Block 1
850+
#-----| True -> Block 5
851+
852+
# 27| Block 4
853+
# 27| r27_1(glval<int>) = VariableAddress[#return] :
854+
# 27| r27_2(int) = Constant[1] :
855+
# 27| m27_3(int) = Store[#return] : &:r27_1, r27_2
856+
# 21| r21_7(glval<int>) = VariableAddress[#return] :
857+
# 21| v21_8(void) = ReturnValue : &:r21_7, m27_3
858+
# 21| v21_9(void) = AliasedUse : ~m25_6
859+
# 21| v21_10(void) = ExitFunction :
860+
861+
# 21| Block 5
837862
# 21| v21_11(void) = Unreached :
838863

839864
ir.cpp:

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@
10081008
| ir.c:21:5:21:17 | Address | &:r21_7 |
10091009
| ir.c:21:5:21:17 | ChiPartial | partial:m21_3 |
10101010
| ir.c:21:5:21:17 | ChiTotal | total:m21_2 |
1011-
| ir.c:21:5:21:17 | Load | m29_3 |
1011+
| ir.c:21:5:21:17 | Load | m27_3 |
10121012
| ir.c:21:5:21:17 | SideEffect | ~m25_6 |
10131013
| ir.c:21:23:21:23 | Address | &:r21_5 |
10141014
| ir.c:22:8:22:15 | Address | &:r22_1 |
@@ -1019,8 +1019,17 @@
10191019
| ir.c:25:28:25:28 | Address | &:r25_2 |
10201020
| ir.c:25:28:25:28 | Arg(0) | 0:r25_3 |
10211021
| ir.c:25:28:25:28 | Load | m21_6 |
1022-
| ir.c:29:3:29:11 | Address | &:r29_1 |
1023-
| ir.c:29:10:29:10 | StoreValue | r29_2 |
1022+
| ir.c:26:14:26:38 | Left | r26_7 |
1023+
| ir.c:26:14:26:38 | Left | r26_7 |
1024+
| ir.c:26:14:26:38 | Left | r26_7 |
1025+
| ir.c:26:41:28:3 | Condition | r26_2 |
1026+
| ir.c:26:41:28:3 | Condition | r26_5 |
1027+
| ir.c:26:41:28:3 | Condition | r26_9 |
1028+
| ir.c:26:41:28:3 | Right | r26_1 |
1029+
| ir.c:26:41:28:3 | Right | r26_4 |
1030+
| ir.c:26:41:28:3 | Right | r26_8 |
1031+
| ir.c:27:5:27:13 | Address | &:r27_1 |
1032+
| ir.c:27:12:27:12 | StoreValue | r27_2 |
10241033
| ir.cpp:1:6:1:14 | ChiPartial | partial:m1_3 |
10251034
| ir.cpp:1:6:1:14 | ChiTotal | total:m1_2 |
10261035
| ir.cpp:1:6:1:14 | SideEffect | m1_3 |

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ multipleIRTypes
2020
lostReachability
2121
backEdgeCountMismatch
2222
useNotDominatedByDefinition
23-
| ir.c:26:14:26:38 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | ir.c:21:5:21:17 | int TryExceptTest(int) | int TryExceptTest(int) |
24-
| ir.c:26:14:26:38 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | ir.c:21:5:21:17 | int TryExceptTest(int) | int TryExceptTest(int) |
2523
| ir.cpp:1486:8:1486:8 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | ir.cpp:1486:8:1486:8 | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() | void StructuredBindingDataMemberStruct::StructuredBindingDataMemberStruct() |
2624
| try_except.c:13:13:13:13 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | try_except.c:6:6:6:6 | void f() | void f() |
2725
| try_except.c:13:13:13:13 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | try_except.c:6:6:6:6 | void f() | void f() |

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ ir.c:
800800
# 25| r25_3(int) = Load[x] : &:r25_2, ~m?
801801
# 25| v25_4(void) = Call[ExRaiseAccessViolation] : func:r25_1, 0:r25_3
802802
# 25| mu25_5(unknown) = ^CallSideEffect : ~m?
803-
#-----| Goto -> Block 7
803+
#-----| Exception -> Block 5
804804

805805
# 21| Block 1
806806
# 21| r21_6(glval<int>) = VariableAddress[#return] :
@@ -822,8 +822,11 @@ ir.c:
822822
#-----| True -> Block 6
823823

824824
# 26| Block 4
825-
# 26| v26_7(void) = Unwind :
826-
#-----| Goto -> Block 7
825+
# 26| v26_7(void) = Unwind :
826+
# 29| r29_1(glval<int>) = VariableAddress[#return] :
827+
# 29| r29_2(int) = Constant[0] :
828+
# 29| mu29_3(int) = Store[#return] : &:r29_1, r29_2
829+
#-----| Goto -> Block 1
827830

828831
# 26| Block 5
829832
# 26| r26_8(int) = Constant[1] :
@@ -839,12 +842,6 @@ ir.c:
839842
# 27| mu27_3(int) = Store[#return] : &:r27_1, r27_2
840843
#-----| Goto -> Block 1
841844

842-
# 29| Block 7
843-
# 29| r29_1(glval<int>) = VariableAddress[#return] :
844-
# 29| r29_2(int) = Constant[0] :
845-
# 29| mu29_3(int) = Store[#return] : &:r29_1, r29_2
846-
#-----| Goto -> Block 1
847-
848845
ir.cpp:
849846
# 1| void Constants()
850847
# 1| Block 0

0 commit comments

Comments
 (0)