Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6be3db8

Browse files
author
Robert Marsh
committed
C++: update test expectations for extractor changes
1 parent 23e9963 commit 6be3db8

4 files changed

Lines changed: 36 additions & 24 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12842,9 +12842,9 @@ ir.cpp:
1284212842
# 1674| getDeclarationEntry(0): (no string representation)
1284312843
# 1674| Type = [ArrayType] int[2]
1284412844
# 1674| getVariable().getInitializer(): [Initializer] initializer for (unnamed local variable)
12845-
# 1674| getExpr(): (no string representation)
12845+
# 1674| getExpr(): [VariableAccess] xs
1284612846
# 1674| Type = [ArrayType] int[2]
12847-
# 1674| ValueCategory = prvalue
12847+
# 1674| ValueCategory = prvalue(load)
1284812848
# 1674| getDeclarationEntry(1): [VariableDeclarationEntry] definition of x0
1284912849
# 1674| Type = [IntType] int
1285012850
#-----| getVariable().getInitializer(): [Initializer] initializer for x0

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,9 @@
684684
| file://:0:0:0:0 | ChiTotal | total:m763_8 |
685685
| file://:0:0:0:0 | ChiTotal | total:m1043_10 |
686686
| file://:0:0:0:0 | ChiTotal | total:m1240_4 |
687+
| file://:0:0:0:0 | Left | r0_2 |
687688
| file://:0:0:0:0 | Left | r0_4 |
689+
| file://:0:0:0:0 | Left | r0_7 |
688690
| file://:0:0:0:0 | Left | r0_11 |
689691
| file://:0:0:0:0 | Load | m0_2 |
690692
| file://:0:0:0:0 | Load | m0_2 |
@@ -696,7 +698,9 @@
696698
| file://:0:0:0:0 | Load | m1466_4 |
697699
| file://:0:0:0:0 | Load | m1466_4 |
698700
| file://:0:0:0:0 | Load | ~m1444_6 |
701+
| file://:0:0:0:0 | Right | r0_3 |
699702
| file://:0:0:0:0 | Right | r0_5 |
703+
| file://:0:0:0:0 | Right | r0_8 |
700704
| file://:0:0:0:0 | Right | r0_12 |
701705
| file://:0:0:0:0 | SideEffect | m0_4 |
702706
| file://:0:0:0:0 | SideEffect | m0_4 |
@@ -726,19 +730,23 @@
726730
| file://:0:0:0:0 | StoreValue | r0_1 |
727731
| file://:0:0:0:0 | StoreValue | r0_1 |
728732
| file://:0:0:0:0 | StoreValue | r0_3 |
733+
| file://:0:0:0:0 | StoreValue | r0_4 |
729734
| file://:0:0:0:0 | StoreValue | r0_6 |
735+
| file://:0:0:0:0 | StoreValue | r0_9 |
730736
| file://:0:0:0:0 | StoreValue | r0_13 |
731737
| file://:0:0:0:0 | StoreValue | r0_13 |
732738
| file://:0:0:0:0 | StoreValue | r0_22 |
733739
| file://:0:0:0:0 | StoreValue | r0_22 |
734740
| file://:0:0:0:0 | Unary | r0_1 |
741+
| file://:0:0:0:0 | Unary | r0_1 |
735742
| file://:0:0:0:0 | Unary | r0_2 |
736743
| file://:0:0:0:0 | Unary | r0_3 |
737744
| file://:0:0:0:0 | Unary | r0_5 |
738745
| file://:0:0:0:0 | Unary | r0_5 |
739746
| file://:0:0:0:0 | Unary | r0_6 |
740747
| file://:0:0:0:0 | Unary | r0_6 |
741748
| file://:0:0:0:0 | Unary | r0_6 |
749+
| file://:0:0:0:0 | Unary | r0_6 |
742750
| file://:0:0:0:0 | Unary | r0_7 |
743751
| file://:0:0:0:0 | Unary | r0_7 |
744752
| file://:0:0:0:0 | Unary | r0_7 |
@@ -7447,6 +7455,7 @@
74477455
| ir.cpp:1668:17:1668:17 | StoreValue | r1668_4 |
74487456
| ir.cpp:1672:6:1672:42 | ChiPartial | partial:m1672_3 |
74497457
| ir.cpp:1672:6:1672:42 | ChiTotal | total:m1672_2 |
7458+
| ir.cpp:1672:6:1672:42 | SideEffect | m1672_3 |
74507459
| ir.cpp:1673:9:1673:10 | Address | &:r1673_1 |
74517460
| ir.cpp:1673:9:1673:10 | Left | r1673_1 |
74527461
| ir.cpp:1673:9:1673:10 | Left | r1673_1 |
@@ -7460,6 +7469,12 @@
74607469
| ir.cpp:1673:21:1673:21 | ChiPartial | partial:m1673_11 |
74617470
| ir.cpp:1673:21:1673:21 | ChiTotal | total:m1673_7 |
74627471
| ir.cpp:1673:21:1673:21 | StoreValue | r1673_10 |
7472+
| ir.cpp:1674:10:1674:10 | Address | &:r1674_1 |
7473+
| ir.cpp:1674:11:1674:11 | Address | &:r1674_5 |
7474+
| ir.cpp:1674:15:1674:15 | Address | &:r1674_6 |
7475+
| ir.cpp:1674:21:1674:22 | Address | &:r1674_2 |
7476+
| ir.cpp:1674:21:1674:22 | Load | m1673_12 |
7477+
| ir.cpp:1674:21:1674:22 | StoreValue | r1674_3 |
74637478
| ir.cpp:1680:5:1680:23 | Address | &:r1680_5 |
74647479
| ir.cpp:1680:5:1680:23 | Address | &:r1680_5 |
74657480
| ir.cpp:1680:5:1680:23 | Address | &:r1680_7 |

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
missingOperand
2-
| ir.cpp:1674:21:1674:22 | Load: Unknown literal | Instruction 'Load' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:1672:6:1672:42 | void array_structured_binding_non_ref_init() | void array_structured_binding_non_ref_init() |
32
| ir.cpp:1688:24:1690:5 | Store: Unknown literal | Instruction 'Store' is missing an expected operand with tag 'StoreValue' in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |
43
| ir.cpp:1688:24:1690:5 | Store: Unknown literal | Instruction 'Store' is missing an expected operand with tag 'StoreValue' in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |
54
| ir.cpp:1689:28:1689:54 | Store: Unknown literal | Instruction 'Store' is missing an expected operand with tag 'StoreValue' in function '$@'. | ir.cpp:1688:46:1688:46 | void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const | void (void captured_lambda(int, int&, int&&))::(lambda [] type at line 1688, col. 25)::operator()() const |
@@ -27,7 +26,6 @@ lostReachability
2726
backEdgeCountMismatch
2827
useNotDominatedByDefinition
2928
| 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() |
30-
| ir.cpp:1674:10:1674:10 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | ir.cpp:1672:6:1672:42 | void array_structured_binding_non_ref_init() | void array_structured_binding_non_ref_init() |
3129
| ir.cpp:1683:34:1683:34 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |
3230
| ir.cpp:1683:43:1683:43 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |
3331
| ir.cpp:1688:10:1688:21 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | ir.cpp:1683:6:1683:20 | void captured_lambda(int, int&, int&&) | void captured_lambda(int, int&, int&&) |

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

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8695,26 +8695,25 @@ ir.cpp:
86958695
# 1673| r1673_9(int) = Constant[2] :
86968696
# 1673| mu1673_10(int) = Store[?] : &:r1673_8, r1673_9
86978697
# 1674| r1674_1(glval<int[2]>) = VariableAddress[(unnamed local variable)] :
8698-
8699-
# 1674| Block 1
8700-
# 1674| r1674_2(int[2]) = Load : ~m?
8701-
# 1674| mu1674_3(int[2]) = Store[(unnamed local variable)] : &:r1674_1, r1674_2
8702-
# 1674| r1674_4(glval<int &>) = VariableAddress[x0] :
8703-
#-----| r0_1(glval<int[2]>) = VariableAddress[(unnamed local variable)] :
8704-
#-----| r0_2(int *) = Convert : r0_1
8705-
#-----| r0_3(unsigned long) = Constant[0] :
8706-
#-----| r0_4(glval<int>) = PointerAdd[4] : r0_2, r0_3
8707-
#-----| mu0_5(int &) = Store[x0] : &:r1674_4, r0_4
8708-
# 1674| r1674_5(glval<int &>) = VariableAddress[x1] :
8709-
#-----| r0_6(glval<int[2]>) = VariableAddress[(unnamed local variable)] :
8710-
#-----| r0_7(int *) = Convert : r0_6
8711-
#-----| r0_8(unsigned long) = Constant[1] :
8712-
#-----| r0_9(glval<int>) = PointerAdd[4] : r0_7, r0_8
8713-
#-----| mu0_10(int &) = Store[x1] : &:r1674_5, r0_9
8714-
# 1675| v1675_1(void) = NoOp :
8715-
# 1672| v1672_4(void) = ReturnVoid :
8716-
# 1672| v1672_5(void) = AliasedUse : ~m?
8717-
# 1672| v1672_6(void) = ExitFunction :
8698+
# 1674| r1674_2(glval<int[2]>) = VariableAddress[xs] :
8699+
# 1674| r1674_3(int[2]) = Load[xs] : &:r1674_2, ~m?
8700+
# 1674| mu1674_4(int[2]) = Store[(unnamed local variable)] : &:r1674_1, r1674_3
8701+
# 1674| r1674_5(glval<int &>) = VariableAddress[x0] :
8702+
#-----| r0_1(glval<int[2]>) = VariableAddress[(unnamed local variable)] :
8703+
#-----| r0_2(int *) = Convert : r0_1
8704+
#-----| r0_3(unsigned long) = Constant[0] :
8705+
#-----| r0_4(glval<int>) = PointerAdd[4] : r0_2, r0_3
8706+
#-----| mu0_5(int &) = Store[x0] : &:r1674_5, r0_4
8707+
# 1674| r1674_6(glval<int &>) = VariableAddress[x1] :
8708+
#-----| r0_6(glval<int[2]>) = VariableAddress[(unnamed local variable)] :
8709+
#-----| r0_7(int *) = Convert : r0_6
8710+
#-----| r0_8(unsigned long) = Constant[1] :
8711+
#-----| r0_9(glval<int>) = PointerAdd[4] : r0_7, r0_8
8712+
#-----| mu0_10(int &) = Store[x1] : &:r1674_6, r0_9
8713+
# 1675| v1675_1(void) = NoOp :
8714+
# 1672| v1672_4(void) = ReturnVoid :
8715+
# 1672| v1672_5(void) = AliasedUse : ~m?
8716+
# 1672| v1672_6(void) = ExitFunction :
87188717

87198718
# 1680| void CapturedLambdaMyObj::CapturedLambdaMyObj()
87208719
# 1680| Block 0

0 commit comments

Comments
 (0)