Skip to content

Commit 9cc4bfe

Browse files
committed
C++: Accept test changes.
1 parent d14ee93 commit 9cc4bfe

7 files changed

+120
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ unexplainedLoop
1111
unnecessaryPhiInstruction
1212
memoryOperandDefinitionIsUnmodeled
1313
operandAcrossFunctions
14+
| ir.cpp:1232:16:1232:16 | Address | Operand 'Address' is used on instruction 'Store: 0' in function '$@', but is defined on instruction 'VariableAddress: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
15+
| ir.cpp:1232:16:1232:16 | SideEffect | Operand 'SideEffect' is used on instruction 'AliasedUse: a' in function '$@', but is defined on instruction 'Chi: 0' in function '$@'. | ir.cpp:1232:16:1232:16 | int a | int a | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) |
16+
| ir.cpp:1232:20:1232:20 | ChiTotal | Operand 'ChiTotal' is used on instruction 'Chi: 0' in function '$@', but is defined on instruction 'AliasedDefinition: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
17+
| ir.cpp:1233:16:1233:16 | Address | Operand 'Address' is used on instruction 'Store: (int)...' in function '$@', but is defined on instruction 'VariableAddress: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
18+
| ir.cpp:1233:16:1233:16 | SideEffect | Operand 'SideEffect' is used on instruction 'AliasedUse: b' in function '$@', but is defined on instruction 'Chi: (int)...' in function '$@'. | ir.cpp:1233:16:1233:16 | int b | int b | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) |
19+
| ir.cpp:1233:20:1233:28 | ChiTotal | Operand 'ChiTotal' is used on instruction 'Chi: (int)...' in function '$@', but is defined on instruction 'AliasedDefinition: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
20+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
21+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
22+
| struct_init.cpp:21:17:21:28 | SideEffect | Operand 'SideEffect' is used on instruction 'AliasedUse: static_infos' in function '$@', but is defined on instruction 'Chi: & ...' in function '$@'. | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() |
23+
| struct_init.cpp:22:11:22:13 | ChiTotal | Operand 'ChiTotal' is used on instruction 'Chi: array to pointer conversion' in function '$@', but is defined on instruction 'AliasedDefinition: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
1424
instructionWithoutUniqueBlock
1525
containsLoopOfForwardEdges
1626
lostReachability

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ unexplainedLoop
1111
unnecessaryPhiInstruction
1212
memoryOperandDefinitionIsUnmodeled
1313
operandAcrossFunctions
14+
| ir.cpp:1232:16:1232:16 | Address | Operand 'Address' is used on instruction 'Store: 0' in function '$@', but is defined on instruction 'VariableAddress: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
15+
| ir.cpp:1232:16:1232:16 | SideEffect | Operand 'SideEffect' is used on instruction 'AliasedUse: a' in function '$@', but is defined on instruction 'Chi: 0' in function '$@'. | ir.cpp:1232:16:1232:16 | int a | int a | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) |
16+
| ir.cpp:1232:20:1232:20 | ChiTotal | Operand 'ChiTotal' is used on instruction 'Chi: 0' in function '$@', but is defined on instruction 'AliasedDefinition: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
17+
| ir.cpp:1233:16:1233:16 | Address | Operand 'Address' is used on instruction 'Store: (int)...' in function '$@', but is defined on instruction 'VariableAddress: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
18+
| ir.cpp:1233:16:1233:16 | SideEffect | Operand 'SideEffect' is used on instruction 'AliasedUse: b' in function '$@', but is defined on instruction 'Chi: (int)...' in function '$@'. | ir.cpp:1233:16:1233:16 | int b | int b | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) |
19+
| ir.cpp:1233:20:1233:28 | ChiTotal | Operand 'ChiTotal' is used on instruction 'Chi: (int)...' in function '$@', but is defined on instruction 'AliasedDefinition: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
20+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
21+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
22+
| struct_init.cpp:21:17:21:28 | SideEffect | Operand 'SideEffect' is used on instruction 'AliasedUse: static_infos' in function '$@', but is defined on instruction 'Chi: & ...' in function '$@'. | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() |
23+
| struct_init.cpp:22:11:22:13 | ChiTotal | Operand 'ChiTotal' is used on instruction 'Chi: array to pointer conversion' in function '$@', but is defined on instruction 'AliasedDefinition: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
1424
instructionWithoutUniqueBlock
1525
containsLoopOfForwardEdges
1626
lostReachability

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5754,6 +5754,16 @@
57545754
| ir.cpp:1231:5:1231:19 | Load | m1237_15 |
57555755
| ir.cpp:1231:5:1231:19 | SideEffect | ~m1237_2 |
57565756
| ir.cpp:1231:25:1231:25 | Address | &:r1231_5 |
5757+
| ir.cpp:1232:16:1232:16 | Address | &:r1232_3 |
5758+
| ir.cpp:1232:16:1232:16 | SideEffect | ~m1232_3 |
5759+
| ir.cpp:1232:20:1232:20 | ChiPartial | partial:m1232_2 |
5760+
| ir.cpp:1232:20:1232:20 | ChiTotal | total:m1232_2 |
5761+
| ir.cpp:1232:20:1232:20 | StoreValue | r1232_1 |
5762+
| ir.cpp:1233:16:1233:16 | Address | &:r1233_3 |
5763+
| ir.cpp:1233:16:1233:16 | SideEffect | ~m1233_3 |
5764+
| ir.cpp:1233:20:1233:28 | ChiPartial | partial:m1233_2 |
5765+
| ir.cpp:1233:20:1233:28 | ChiTotal | total:m1233_2 |
5766+
| ir.cpp:1233:20:1233:28 | StoreValue | r1233_1 |
57575767
| ir.cpp:1234:16:1234:16 | Address | &:r1234_1 |
57585768
| ir.cpp:1234:16:1234:16 | Address | &:r1234_1 |
57595769
| ir.cpp:1234:16:1234:16 | Address | &:r1234_4 |
@@ -9030,6 +9040,34 @@
90309040
| struct_init.cpp:20:6:20:25 | ChiPartial | partial:m20_3 |
90319041
| struct_init.cpp:20:6:20:25 | ChiTotal | total:m20_2 |
90329042
| struct_init.cpp:20:6:20:25 | SideEffect | ~m25_9 |
9043+
| struct_init.cpp:21:17:21:28 | Left | r21_3 |
9044+
| struct_init.cpp:21:17:21:28 | Left | r21_3 |
9045+
| struct_init.cpp:21:17:21:28 | SideEffect | ~m23_10 |
9046+
| struct_init.cpp:21:34:24:5 | Right | r21_1 |
9047+
| struct_init.cpp:21:34:24:5 | Right | r21_3 |
9048+
| struct_init.cpp:21:34:24:5 | Unary | r21_2 |
9049+
| struct_init.cpp:21:34:24:5 | Unary | r21_2 |
9050+
| struct_init.cpp:21:34:24:5 | Unary | r21_4 |
9051+
| struct_init.cpp:21:34:24:5 | Unary | r21_4 |
9052+
| struct_init.cpp:22:9:22:25 | Address | &:r22_1 |
9053+
| struct_init.cpp:22:9:22:25 | Address | &:r22_6 |
9054+
| struct_init.cpp:22:11:22:13 | ChiPartial | partial:m22_4 |
9055+
| struct_init.cpp:22:11:22:13 | ChiTotal | total:m21_2 |
9056+
| struct_init.cpp:22:11:22:13 | StoreValue | r22_3 |
9057+
| struct_init.cpp:22:11:22:13 | Unary | r22_2 |
9058+
| struct_init.cpp:22:16:22:23 | ChiPartial | partial:m22_8 |
9059+
| struct_init.cpp:22:16:22:23 | ChiTotal | total:m22_5 |
9060+
| struct_init.cpp:22:16:22:23 | StoreValue | r22_7 |
9061+
| struct_init.cpp:23:9:23:26 | Address | &:r23_1 |
9062+
| struct_init.cpp:23:9:23:26 | Address | &:r23_6 |
9063+
| struct_init.cpp:23:11:23:13 | ChiPartial | partial:m23_4 |
9064+
| struct_init.cpp:23:11:23:13 | ChiTotal | total:m22_9 |
9065+
| struct_init.cpp:23:11:23:13 | StoreValue | r23_3 |
9066+
| struct_init.cpp:23:11:23:13 | Unary | r23_2 |
9067+
| struct_init.cpp:23:16:23:24 | ChiPartial | partial:m23_9 |
9068+
| struct_init.cpp:23:16:23:24 | ChiTotal | total:m23_5 |
9069+
| struct_init.cpp:23:16:23:24 | StoreValue | r23_8 |
9070+
| struct_init.cpp:23:17:23:24 | Unary | r23_7 |
90339071
| struct_init.cpp:25:5:25:19 | CallTarget | func:r25_1 |
90349072
| struct_init.cpp:25:5:25:19 | ChiPartial | partial:m25_5 |
90359073
| struct_init.cpp:25:5:25:19 | ChiTotal | total:m20_4 |

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ unexplainedLoop
1111
unnecessaryPhiInstruction
1212
memoryOperandDefinitionIsUnmodeled
1313
operandAcrossFunctions
14+
| ir.cpp:1232:16:1232:16 | Address | Operand 'Address' is used on instruction 'Store: 0' in function '$@', but is defined on instruction 'VariableAddress: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
15+
| ir.cpp:1233:16:1233:16 | Address | Operand 'Address' is used on instruction 'Store: (int)...' in function '$@', but is defined on instruction 'VariableAddress: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
16+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
17+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
1418
instructionWithoutUniqueBlock
1519
containsLoopOfForwardEdges
1620
lostReachability

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6841,6 +6841,28 @@ ir.cpp:
68416841
# 1231| v1231_8(void) = AliasedUse : ~m?
68426842
# 1231| v1231_9(void) = ExitFunction :
68436843

6844+
# 1232| int a
6845+
# 1232| Block 0
6846+
# 1232| v1232_1(void) = EnterFunction :
6847+
# 1232| mu1232_2(unknown) = AliasedDefinition :
6848+
# 1232| r1232_3(glval<int>) = VariableAddress[a] :
6849+
# 1232| r1232_1(int) = Constant[0] :
6850+
# 1232| mu1232_2(int) = Store[a] : &:r1232_3, r1232_1
6851+
# 1232| v1232_4(void) = ReturnVoid :
6852+
# 1232| v1232_5(void) = AliasedUse : ~m?
6853+
# 1232| v1232_6(void) = ExitFunction :
6854+
6855+
# 1233| int b
6856+
# 1233| Block 0
6857+
# 1233| v1233_1(void) = EnterFunction :
6858+
# 1233| mu1233_2(unknown) = AliasedDefinition :
6859+
# 1233| r1233_3(glval<int>) = VariableAddress[b] :
6860+
# 1233| r1233_1(int) = Constant[4] :
6861+
# 1233| mu1233_2(int) = Store[b] : &:r1233_3, r1233_1
6862+
# 1233| v1233_4(void) = ReturnVoid :
6863+
# 1233| v1233_5(void) = AliasedUse : ~m?
6864+
# 1233| v1233_6(void) = ExitFunction :
6865+
68446866
# 1240| void staticLocalWithConstructor(char const*)
68456867
# 1240| Block 0
68466868
# 1240| v1240_1(void) = EnterFunction :
@@ -10320,6 +10342,34 @@ struct_init.cpp:
1032010342
# 20| v20_5(void) = AliasedUse : ~m?
1032110343
# 20| v20_6(void) = ExitFunction :
1032210344

10345+
# 21| Info[] static_infos
10346+
# 21| Block 0
10347+
# 21| v21_1(void) = EnterFunction :
10348+
# 21| mu21_2(unknown) = AliasedDefinition :
10349+
# 21| r21_3(glval<Info[]>) = VariableAddress[static_infos] :
10350+
# 21| r21_1(int) = Constant[0] :
10351+
# 21| r21_2(glval<Info>) = PointerAdd[16] : r21_3, r21_1
10352+
# 22| r22_1(glval<char *>) = FieldAddress[name] : r21_2
10353+
# 22| r22_2(glval<char[2]>) = StringConstant["1"] :
10354+
# 22| r22_3(char *) = Convert : r22_2
10355+
# 22| mu22_4(char *) = Store[?] : &:r22_1, r22_3
10356+
# 22| r22_5(glval<..(*)(..)>) = FieldAddress[handler] : r21_2
10357+
# 22| r22_6(..(*)(..)) = FunctionAddress[handler1] :
10358+
# 22| mu22_7(..(*)(..)) = Store[?] : &:r22_5, r22_6
10359+
# 21| r21_3(int) = Constant[1] :
10360+
# 21| r21_4(glval<Info>) = PointerAdd[16] : r21_3, r21_3
10361+
# 23| r23_1(glval<char *>) = FieldAddress[name] : r21_4
10362+
# 23| r23_2(glval<char[2]>) = StringConstant["2"] :
10363+
# 23| r23_3(char *) = Convert : r23_2
10364+
# 23| mu23_4(char *) = Store[?] : &:r23_1, r23_3
10365+
# 23| r23_5(glval<..(*)(..)>) = FieldAddress[handler] : r21_4
10366+
# 23| r23_6(glval<..()(..)>) = FunctionAddress[handler2] :
10367+
# 23| r23_7(..(*)(..)) = CopyValue : r23_6
10368+
# 23| mu23_8(..(*)(..)) = Store[?] : &:r23_5, r23_7
10369+
# 21| v21_4(void) = ReturnVoid :
10370+
# 21| v21_5(void) = AliasedUse : ~m?
10371+
# 21| v21_6(void) = ExitFunction :
10372+
1032310373
# 28| void declare_local_infos()
1032410374
# 28| Block 0
1032510375
# 28| v28_1(void) = EnterFunction :

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ unexplainedLoop
1111
unnecessaryPhiInstruction
1212
memoryOperandDefinitionIsUnmodeled
1313
operandAcrossFunctions
14+
| ir.cpp:1232:16:1232:16 | Address | Operand 'Address' is used on instruction 'Store: 0' in function '$@', but is defined on instruction 'VariableAddress: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
15+
| ir.cpp:1233:16:1233:16 | Address | Operand 'Address' is used on instruction 'Store: (int)...' in function '$@', but is defined on instruction 'VariableAddress: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
16+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
17+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
1418
instructionWithoutUniqueBlock
1519
containsLoopOfForwardEdges
1620
lostReachability

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ unexplainedLoop
1111
unnecessaryPhiInstruction
1212
memoryOperandDefinitionIsUnmodeled
1313
operandAcrossFunctions
14+
| ir.cpp:1232:16:1232:16 | Address | Operand 'Address' is used on instruction 'Store: 0' in function '$@', but is defined on instruction 'VariableAddress: a' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1232:16:1232:16 | int a | int a |
15+
| ir.cpp:1233:16:1233:16 | Address | Operand 'Address' is used on instruction 'Store: (int)...' in function '$@', but is defined on instruction 'VariableAddress: b' in function '$@'. | ir.cpp:1231:5:1231:19 | int staticLocalInit(int) | int staticLocalInit(int) | ir.cpp:1233:16:1233:16 | int b | int b |
16+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
17+
| struct_init.cpp:21:17:21:28 | Left | Operand 'Left' is used on instruction 'PointerAdd: {...}' in function '$@', but is defined on instruction 'VariableAddress: static_infos' in function '$@'. | struct_init.cpp:20:6:20:25 | void declare_static_infos() | void declare_static_infos() | struct_init.cpp:21:17:21:28 | Info[] static_infos | Info[] static_infos |
1418
instructionWithoutUniqueBlock
1519
containsLoopOfForwardEdges
1620
lostReachability

0 commit comments

Comments
 (0)