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

Skip to content

Commit a6a0e20

Browse files
committed
C++: Accept test changes.
1 parent 796fcfe commit a6a0e20

8 files changed

Lines changed: 109 additions & 265 deletions

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

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,8 +1175,8 @@ destructors_for_temps.cpp:
11751175
# 52| r52_2(glval<ClassWithDestructor2>) = VariableAddress[c] :
11761176
# 52| r52_3(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
11771177
# 52| v52_4(void) = Call[~ClassWithDestructor2] : func:r52_3, this:r52_2
1178-
# 52| m52_5(unknown) = ^CallSideEffect : ~m51_62, ~m51_84
1179-
# 52| m52_6(unknown) = Chi : total:m51_62, total:m51_84, partial:m52_5
1178+
# 52| m52_5(unknown) = ^CallSideEffect : ~m51_52, ~m51_64
1179+
# 52| m52_6(unknown) = Chi : total:m51_52, total:m51_64, partial:m52_5
11801180
# 52| v52_7(void) = ^IndirectReadSideEffect[-1] : &:r52_2, m50_8
11811181
# 52| m52_8(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r52_2
11821182
# 52| m52_9(ClassWithDestructor2) = Chi : total:m50_8, partial:m52_8
@@ -1233,25 +1233,16 @@ destructors_for_temps.cpp:
12331233
#-----| Goto -> Block 8
12341234

12351235
# 51| Block 8
1236-
# 51| m51_70(ClassWithDestructor2) = Phi : from 4:m51_57, from 4:m51_79
1237-
# 51| m51_71(unknown) = Phi : from 4:~m51_62, from 4:~m51_84, from 6:~m51_37
1238-
# 51| m51_69(ClassWithDestructor2) = Phi : from 4:m51_65, from 4:m51_87, from 6:m51_39
1239-
# 51| r51_72(glval<ClassWithDestructor2>) = CopyValue : r51_1
1240-
# 51| r51_73(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
1241-
# 51| v51_74(void) = Call[~ClassWithDestructor2] : func:r51_51, func:r51_73, this:r51_50, this:r51_72
1242-
# 51| m51_75(unknown) = ^CallSideEffect : ~m51_46, ~m51_49, ~m51_68, ~m51_71
1243-
# 51| m51_76(unknown) = Chi : total:m51_46, total:m51_49, total:m51_68, total:m51_71, partial:m51_53, partial:m51_75
1244-
# 51| v51_77(void) = ^IndirectReadSideEffect[-1] : &:r51_50, &:r51_72, m51_45, m51_48, m51_67, m51_70
1245-
# 51| m51_78(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r51_50, &:r51_72
1246-
# 51| m51_79(ClassWithDestructor2) = Chi : total:m51_45, total:m51_48, total:m51_67, total:m51_70, partial:m51_56, partial:m51_78
1247-
# 51| r51_80(glval<ClassWithDestructor2>) = CopyValue : r51_32
1248-
# 51| r51_81(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
1249-
# 51| v51_82(void) = Call[~ClassWithDestructor2] : func:r51_59, func:r51_81, this:r51_58, this:r51_80
1250-
# 51| m51_83(unknown) = ^CallSideEffect : ~m51_54, ~m51_76
1251-
# 51| m51_84(unknown) = Chi : total:m51_54, total:m51_76, partial:m51_61, partial:m51_83
1252-
# 51| v51_85(void) = ^IndirectReadSideEffect[-1] : &:r51_58, &:r51_80, m51_44, m51_47, m51_66, m51_69
1253-
# 51| m51_86(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r51_58, &:r51_80
1254-
# 51| m51_87(ClassWithDestructor2) = Chi : total:m51_44, total:m51_47, total:m51_66, total:m51_69, partial:m51_64, partial:m51_86
1236+
# 51| m51_58(ClassWithDestructor2) = Phi : from 4:m51_55, from 4:m51_67
1237+
# 51| m51_59(unknown) = Phi : from 4:~m51_52, from 4:~m51_64, from 6:~m51_37
1238+
# 51| r51_60(glval<ClassWithDestructor2>) = CopyValue : r51_1
1239+
# 51| r51_61(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
1240+
# 51| v51_62(void) = Call[~ClassWithDestructor2] : func:r51_49, func:r51_61, this:r51_48, this:r51_60
1241+
# 51| m51_63(unknown) = ^CallSideEffect : ~m51_45, ~m51_47, ~m51_57, ~m51_59
1242+
# 51| m51_64(unknown) = Chi : total:m51_45, total:m51_47, total:m51_57, total:m51_59, partial:m51_51, partial:m51_63
1243+
# 51| v51_65(void) = ^IndirectReadSideEffect[-1] : &:r51_48, &:r51_60, m51_44, m51_46, m51_56, m51_58
1244+
# 51| m51_66(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r51_48, &:r51_60
1245+
# 51| m51_67(ClassWithDestructor2) = Chi : total:m51_44, total:m51_46, total:m51_56, total:m51_58, partial:m51_54, partial:m51_66
12551246
#-----| Goto (back edge) -> Block 4
12561247
#-----| Goto (back edge) -> Block 3
12571248

@@ -1275,7 +1266,7 @@ destructors_for_temps.cpp:
12751266
#-----| True -> Block 5
12761267

12771268
# 54| Block 1
1278-
# 54| m54_7(unknown) = Phi : from 2:~m55_28, from 3:~m55_62, from 3:~m55_84
1269+
# 54| m54_7(unknown) = Phi : from 2:~m55_28, from 3:~m55_52, from 3:~m55_64
12791270
# 54| v54_8(void) = AliasedUse : ~m54_7
12801271
# 54| v54_9(void) = ExitFunction :
12811272

@@ -1339,25 +1330,16 @@ destructors_for_temps.cpp:
13391330
#-----| Goto -> Block 8
13401331

13411332
# 55| Block 8
1342-
# 55| m55_70(ClassWithDestructor2) = Phi : from 4:m55_65, from 4:m55_87, from 6:m55_39
1343-
# 55| m55_71(unknown) = Phi : from 4:~m55_62, from 4:~m55_84, from 6:~m55_37
1344-
# 55| m55_69(ClassWithDestructor2) = Phi : from 4:m55_57, from 4:m55_79
1345-
# 55| r55_72(glval<ClassWithDestructor2>) = CopyValue : r55_1
1346-
# 55| r55_73(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
1347-
# 55| v55_74(void) = Call[~ClassWithDestructor2] : func:r55_51, func:r55_73, this:r55_50, this:r55_72
1348-
# 55| m55_75(unknown) = ^CallSideEffect : ~m55_46, ~m55_49, ~m55_68, ~m55_71
1349-
# 55| m55_76(unknown) = Chi : total:m55_46, total:m55_49, total:m55_68, total:m55_71, partial:m55_53, partial:m55_75
1350-
# 55| v55_77(void) = ^IndirectReadSideEffect[-1] : &:r55_50, &:r55_72, m55_44, m55_47, m55_66, m55_69
1351-
# 55| m55_78(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r55_50, &:r55_72
1352-
# 55| m55_79(ClassWithDestructor2) = Chi : total:m55_44, total:m55_47, total:m55_66, total:m55_69, partial:m55_56, partial:m55_78
1353-
# 55| r55_80(glval<ClassWithDestructor2>) = CopyValue : r55_32
1354-
# 55| r55_81(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
1355-
# 55| v55_82(void) = Call[~ClassWithDestructor2] : func:r55_59, func:r55_81, this:r55_58, this:r55_80
1356-
# 55| m55_83(unknown) = ^CallSideEffect : ~m55_54, ~m55_76
1357-
# 55| m55_84(unknown) = Chi : total:m55_54, total:m55_76, partial:m55_61, partial:m55_83
1358-
# 55| v55_85(void) = ^IndirectReadSideEffect[-1] : &:r55_58, &:r55_80, m55_45, m55_48, m55_67, m55_70
1359-
# 55| m55_86(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r55_58, &:r55_80
1360-
# 55| m55_87(ClassWithDestructor2) = Chi : total:m55_45, total:m55_48, total:m55_67, total:m55_70, partial:m55_64, partial:m55_86
1333+
# 55| m55_58(ClassWithDestructor2) = Phi : from 4:m55_55, from 4:m55_67
1334+
# 55| m55_59(unknown) = Phi : from 4:~m55_52, from 4:~m55_64, from 6:~m55_37
1335+
# 55| r55_60(glval<ClassWithDestructor2>) = CopyValue : r55_1
1336+
# 55| r55_61(glval<unknown>) = FunctionAddress[~ClassWithDestructor2] :
1337+
# 55| v55_62(void) = Call[~ClassWithDestructor2] : func:r55_49, func:r55_61, this:r55_48, this:r55_60
1338+
# 55| m55_63(unknown) = ^CallSideEffect : ~m55_45, ~m55_47, ~m55_57, ~m55_59
1339+
# 55| m55_64(unknown) = Chi : total:m55_45, total:m55_47, total:m55_57, total:m55_59, partial:m55_51, partial:m55_63
1340+
# 55| v55_65(void) = ^IndirectReadSideEffect[-1] : &:r55_48, &:r55_60, m55_44, m55_46, m55_56, m55_58
1341+
# 55| m55_66(ClassWithDestructor2) = ^IndirectMayWriteSideEffect[-1] : &:r55_48, &:r55_60
1342+
# 55| m55_67(ClassWithDestructor2) = Chi : total:m55_44, total:m55_46, total:m55_56, total:m55_58, partial:m55_54, partial:m55_66
13611343
#-----| Goto (back edge) -> Block 4
13621344
#-----| Goto (back edge) -> Block 3
13631345

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

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ duplicateChiOperand
77
sideEffectWithoutPrimary
88
instructionWithoutSuccessor
99
ambiguousSuccessors
10-
| destructors_for_temps.cpp:51:75:51:96 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' has 2 successors of kind 'Goto' in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
11-
| destructors_for_temps.cpp:55:75:55:96 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' has 2 successors of kind 'Goto' in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
10+
| destructors_for_temps.cpp:51:5:51:96 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' has 2 successors of kind 'Goto' in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
11+
| destructors_for_temps.cpp:55:5:55:96 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' has 2 successors of kind 'Goto' in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
1212
unexplainedLoop
1313
| destructors_for_temps.cpp:51:5:51:5 | Load: ... ? ... : ... | Instruction 'Load: ... ? ... : ...' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
1414
| destructors_for_temps.cpp:51:5:51:96 | Call: call to ~ClassWithDestructor2 | Instruction 'Call: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
@@ -20,14 +20,6 @@ unexplainedLoop
2020
| destructors_for_temps.cpp:51:5:51:96 | IndirectMayWriteSideEffect: reuse of temporary object | Instruction 'IndirectMayWriteSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
2121
| destructors_for_temps.cpp:51:5:51:96 | IndirectReadSideEffect: reuse of temporary object | Instruction 'IndirectReadSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
2222
| destructors_for_temps.cpp:51:5:51:96 | Phi: reuse of temporary object | Instruction 'Phi: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
23-
| destructors_for_temps.cpp:51:75:51:96 | Call: call to ~ClassWithDestructor2 | Instruction 'Call: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
24-
| destructors_for_temps.cpp:51:75:51:96 | CallSideEffect: call to ~ClassWithDestructor2 | Instruction 'CallSideEffect: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
25-
| destructors_for_temps.cpp:51:75:51:96 | Chi: call to ~ClassWithDestructor2 | Instruction 'Chi: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
26-
| destructors_for_temps.cpp:51:75:51:96 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
27-
| destructors_for_temps.cpp:51:75:51:96 | CopyValue: reuse of temporary object | Instruction 'CopyValue: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
28-
| destructors_for_temps.cpp:51:75:51:96 | FunctionAddress: call to ~ClassWithDestructor2 | Instruction 'FunctionAddress: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
29-
| destructors_for_temps.cpp:51:75:51:96 | IndirectMayWriteSideEffect: reuse of temporary object | Instruction 'IndirectMayWriteSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
30-
| destructors_for_temps.cpp:51:75:51:96 | IndirectReadSideEffect: reuse of temporary object | Instruction 'IndirectReadSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:49:6:49:15 | void temp_test7(bool) | void temp_test7(bool) |
3123
| destructors_for_temps.cpp:55:5:55:5 | Load: ... ? ... : ... | Instruction 'Load: ... ? ... : ...' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
3224
| destructors_for_temps.cpp:55:5:55:96 | Call: call to ~ClassWithDestructor2 | Instruction 'Call: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
3325
| destructors_for_temps.cpp:55:5:55:96 | CallSideEffect: call to ~ClassWithDestructor2 | Instruction 'CallSideEffect: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
@@ -38,14 +30,6 @@ unexplainedLoop
3830
| destructors_for_temps.cpp:55:5:55:96 | IndirectMayWriteSideEffect: reuse of temporary object | Instruction 'IndirectMayWriteSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
3931
| destructors_for_temps.cpp:55:5:55:96 | IndirectReadSideEffect: reuse of temporary object | Instruction 'IndirectReadSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
4032
| destructors_for_temps.cpp:55:5:55:96 | Phi: reuse of temporary object | Instruction 'Phi: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
41-
| destructors_for_temps.cpp:55:75:55:96 | Call: call to ~ClassWithDestructor2 | Instruction 'Call: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
42-
| destructors_for_temps.cpp:55:75:55:96 | CallSideEffect: call to ~ClassWithDestructor2 | Instruction 'CallSideEffect: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
43-
| destructors_for_temps.cpp:55:75:55:96 | Chi: call to ~ClassWithDestructor2 | Instruction 'Chi: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
44-
| destructors_for_temps.cpp:55:75:55:96 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
45-
| destructors_for_temps.cpp:55:75:55:96 | CopyValue: reuse of temporary object | Instruction 'CopyValue: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
46-
| destructors_for_temps.cpp:55:75:55:96 | FunctionAddress: call to ~ClassWithDestructor2 | Instruction 'FunctionAddress: call to ~ClassWithDestructor2' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
47-
| destructors_for_temps.cpp:55:75:55:96 | IndirectMayWriteSideEffect: reuse of temporary object | Instruction 'IndirectMayWriteSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
48-
| destructors_for_temps.cpp:55:75:55:96 | IndirectReadSideEffect: reuse of temporary object | Instruction 'IndirectReadSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | destructors_for_temps.cpp:54:6:54:15 | void temp_test8(bool) | void temp_test8(bool) |
4933
unnecessaryPhiInstruction
5034
memoryOperandDefinitionIsUnmodeled
5135
operandAcrossFunctions

0 commit comments

Comments
 (0)