Skip to content

Commit 8842b97

Browse files
committed
C++: Accept test changes.
1 parent 65b69fe commit 8842b97

7 files changed

+291
-263
lines changed

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

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -860,30 +860,50 @@ coroutines.cpp:
860860
# 95| m95_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_9
861861
# 95| m95_16(promise_type) = Chi : total:m95_8, partial:m95_15
862862
#-----| v0_5(void) = CopyValue : r95_11
863+
# 96| r96_1(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
864+
# 96| r96_2(glval<unknown>) = FunctionAddress[yield_value] :
865+
# 96| r96_3(glval<int>) = VariableAddress[i] :
866+
# 96| r96_4(int) = Load[i] : &:r96_3, m0_4
867+
# 96| r96_5(suspend_always) = Call[yield_value] : func:r96_2, this:r96_1, 0:r96_4
868+
# 96| m96_6(unknown) = ^CallSideEffect : ~m95_13
869+
# 96| m96_7(unknown) = Chi : total:m95_13, partial:m96_6
870+
# 96| v96_8(void) = ^IndirectReadSideEffect[-1] : &:r96_1, m95_16
871+
# 96| m96_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1
872+
# 96| m96_10(promise_type) = Chi : total:m95_16, partial:m96_9
863873

864874
# 99| co_returnable_value co_yield_value_value(int)
865875
# 99| Block 0
866-
# 99| v99_1(void) = EnterFunction :
867-
# 99| m99_2(unknown) = AliasedDefinition :
868-
# 99| m99_3(unknown) = InitializeNonLocal :
869-
# 99| m99_4(unknown) = Chi : total:m99_2, partial:m99_3
870-
# 99| r99_5(glval<int>) = VariableAddress[i] :
871-
# 99| m99_6(int) = InitializeParameter[i] : &:r99_5
872-
#-----| r0_1(glval<int>) = VariableAddress[i] :
873-
#-----| r0_2(glval<int>) = VariableAddress[i] :
874-
#-----| r0_3(int) = Load[i] : &:r0_2, m99_6
875-
#-----| m0_4(int) = Store[i] : &:r0_1, r0_3
876-
# 99| r99_7(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
877-
# 99| m99_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r99_7
878-
# 99| r99_9(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
879-
# 99| r99_10(glval<unknown>) = FunctionAddress[initial_suspend] :
880-
# 99| r99_11(suspend_always) = Call[initial_suspend] : func:r99_10, this:r99_9
881-
# 99| m99_12(unknown) = ^CallSideEffect : ~m99_4
882-
# 99| m99_13(unknown) = Chi : total:m99_4, partial:m99_12
883-
# 99| v99_14(void) = ^IndirectReadSideEffect[-1] : &:r99_9, m99_8
884-
# 99| m99_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_9
885-
# 99| m99_16(promise_type) = Chi : total:m99_8, partial:m99_15
886-
#-----| v0_5(void) = CopyValue : r99_11
876+
# 99| v99_1(void) = EnterFunction :
877+
# 99| m99_2(unknown) = AliasedDefinition :
878+
# 99| m99_3(unknown) = InitializeNonLocal :
879+
# 99| m99_4(unknown) = Chi : total:m99_2, partial:m99_3
880+
# 99| r99_5(glval<int>) = VariableAddress[i] :
881+
# 99| m99_6(int) = InitializeParameter[i] : &:r99_5
882+
#-----| r0_1(glval<int>) = VariableAddress[i] :
883+
#-----| r0_2(glval<int>) = VariableAddress[i] :
884+
#-----| r0_3(int) = Load[i] : &:r0_2, m99_6
885+
#-----| m0_4(int) = Store[i] : &:r0_1, r0_3
886+
# 99| r99_7(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
887+
# 99| m99_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r99_7
888+
# 99| r99_9(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
889+
# 99| r99_10(glval<unknown>) = FunctionAddress[initial_suspend] :
890+
# 99| r99_11(suspend_always) = Call[initial_suspend] : func:r99_10, this:r99_9
891+
# 99| m99_12(unknown) = ^CallSideEffect : ~m99_4
892+
# 99| m99_13(unknown) = Chi : total:m99_4, partial:m99_12
893+
# 99| v99_14(void) = ^IndirectReadSideEffect[-1] : &:r99_9, m99_8
894+
# 99| m99_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_9
895+
# 99| m99_16(promise_type) = Chi : total:m99_8, partial:m99_15
896+
#-----| v0_5(void) = CopyValue : r99_11
897+
# 100| r100_1(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
898+
# 100| r100_2(glval<unknown>) = FunctionAddress[yield_value] :
899+
# 100| r100_3(glval<int>) = VariableAddress[i] :
900+
# 100| r100_4(int) = Load[i] : &:r100_3, m0_4
901+
# 100| r100_5(suspend_always) = Call[yield_value] : func:r100_2, this:r100_1, 0:r100_4
902+
# 100| m100_6(unknown) = ^CallSideEffect : ~m99_13
903+
# 100| m100_7(unknown) = Chi : total:m99_13, partial:m100_6
904+
# 100| v100_8(void) = ^IndirectReadSideEffect[-1] : &:r100_1, m99_16
905+
# 100| m100_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1
906+
# 100| m100_10(promise_type) = Chi : total:m99_16, partial:m100_9
887907

888908
# 103| co_returnable_void co_yield_and_return_void(int)
889909
# 103| Block 0
@@ -908,6 +928,16 @@ coroutines.cpp:
908928
# 103| m103_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_9
909929
# 103| m103_16(promise_type) = Chi : total:m103_8, partial:m103_15
910930
#-----| v0_5(void) = CopyValue : r103_11
931+
# 104| r104_1(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
932+
# 104| r104_2(glval<unknown>) = FunctionAddress[yield_value] :
933+
# 104| r104_3(glval<int>) = VariableAddress[i] :
934+
# 104| r104_4(int) = Load[i] : &:r104_3, m0_4
935+
# 104| r104_5(suspend_always) = Call[yield_value] : func:r104_2, this:r104_1, 0:r104_4
936+
# 104| m104_6(unknown) = ^CallSideEffect : ~m103_13
937+
# 104| m104_7(unknown) = Chi : total:m103_13, partial:m104_6
938+
# 104| v104_8(void) = ^IndirectReadSideEffect[-1] : &:r104_1, m103_16
939+
# 104| m104_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_1
940+
# 104| m104_10(promise_type) = Chi : total:m103_16, partial:m104_9
911941

912942
# 108| co_returnable_value co_yield_and_return_value(int)
913943
# 108| Block 0
@@ -932,6 +962,16 @@ coroutines.cpp:
932962
# 108| m108_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_9
933963
# 108| m108_16(promise_type) = Chi : total:m108_8, partial:m108_15
934964
#-----| v0_5(void) = CopyValue : r108_11
965+
# 109| r109_1(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
966+
# 109| r109_2(glval<unknown>) = FunctionAddress[yield_value] :
967+
# 109| r109_3(glval<int>) = VariableAddress[i] :
968+
# 109| r109_4(int) = Load[i] : &:r109_3, m0_4
969+
# 109| r109_5(suspend_always) = Call[yield_value] : func:r109_2, this:r109_1, 0:r109_4
970+
# 109| m109_6(unknown) = ^CallSideEffect : ~m108_13
971+
# 109| m109_7(unknown) = Chi : total:m108_13, partial:m109_6
972+
# 109| v109_8(void) = ^IndirectReadSideEffect[-1] : &:r109_1, m108_16
973+
# 109| m109_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_1
974+
# 109| m109_10(promise_type) = Chi : total:m108_16, partial:m109_9
935975

936976
destructors_for_temps.cpp:
937977
# 9| void ClassWithConstructor::ClassWithConstructor(ClassWithConstructor&&)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ missingOperandType
66
duplicateChiOperand
77
sideEffectWithoutPrimary
88
instructionWithoutSuccessor
9-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) |
10-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) |
11-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) |
12-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) |
9+
| coroutines.cpp:96:12:96:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) |
10+
| coroutines.cpp:100:12:100:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) |
11+
| coroutines.cpp:104:12:104:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) |
12+
| coroutines.cpp:109:12:109:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) |
1313
ambiguousSuccessors
1414
unexplainedLoop
1515
unnecessaryPhiInstruction

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ missingOperandType
66
duplicateChiOperand
77
sideEffectWithoutPrimary
88
instructionWithoutSuccessor
9-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) |
10-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) |
11-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) |
12-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) |
9+
| coroutines.cpp:96:12:96:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) |
10+
| coroutines.cpp:100:12:100:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) |
11+
| coroutines.cpp:104:12:104:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) |
12+
| coroutines.cpp:109:12:109:12 | Chi: (unnamed local variable) | Instruction 'Chi: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) |
1313
ambiguousSuccessors
1414
unexplainedLoop
1515
unnecessaryPhiInstruction

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ instructionWithoutSuccessor
6464
| file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) |
6565
| file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) |
6666
| file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) |
67-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) |
68-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) |
69-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) |
70-
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) |
7167
| file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() |
7268
| file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() |
7369
| file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() |

0 commit comments

Comments
 (0)