Skip to content

Commit

Permalink
Merge pull request #16447 from jketema/destructors-loc
Browse files Browse the repository at this point in the history
C++: Update test results after extractor changes
  • Loading branch information
jketema authored May 8, 2024
2 parents c5403f4 + 61580da commit 9bc04e7
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 94 deletions.
24 changes: 12 additions & 12 deletions cpp/ql/test/library-tests/ir/ir/PrintAST.expected
Original file line number Diff line number Diff line change
Expand Up @@ -20678,12 +20678,12 @@ ir.cpp:
# 2309| getQualifier(): [VariableAccess] s2
# 2309| Type = [Struct] String
# 2309| ValueCategory = lvalue
#-----| getImplicitDestructorCall(0): [DestructorCall] call to ~vector
#-----| Type = [VoidType] void
#-----| ValueCategory = prvalue
#-----| getQualifier(): [ReuseExpr] reuse of temporary object
#-----| Type = [ClassTemplateInstantiation,Struct] vector<String>
#-----| ValueCategory = xvalue
# 2307| getImplicitDestructorCall(0): [DestructorCall] call to ~vector
# 2307| Type = [VoidType] void
# 2307| ValueCategory = prvalue
# 2307| getQualifier(): [ReuseExpr] reuse of temporary object
# 2307| Type = [ClassTemplateInstantiation,Struct] vector<String>
# 2307| ValueCategory = xvalue
# 2307| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference)
# 2307| Type = [ClassTemplateInstantiation,Struct] iterator<random_access_iterator_tag, String, ptrdiff_t, String *, String &>
# 2307| ValueCategory = lvalue
Expand Down Expand Up @@ -22208,12 +22208,12 @@ ir.cpp:
# 2431| Conversion = [IntegralConversion] integral conversion
# 2431| Type = [IntType] int
# 2431| ValueCategory = prvalue
#-----| getImplicitDestructorCall(0): [DestructorCall] call to ~vector
#-----| Type = [VoidType] void
#-----| ValueCategory = prvalue
#-----| getQualifier(): [ReuseExpr] reuse of temporary object
#-----| Type = [ClassTemplateInstantiation,Struct] vector<char>
#-----| ValueCategory = xvalue
# 2430| getImplicitDestructorCall(0): [DestructorCall] call to ~vector
# 2430| Type = [VoidType] void
# 2430| ValueCategory = prvalue
# 2430| getQualifier(): [ReuseExpr] reuse of temporary object
# 2430| Type = [ClassTemplateInstantiation,Struct] vector<char>
# 2430| ValueCategory = xvalue
# 2430| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference)
# 2430| Type = [ClassTemplateInstantiation,Struct] iterator<random_access_iterator_tag, char, ptrdiff_t, char *, char &>
# 2430| ValueCategory = lvalue
Expand Down
92 changes: 46 additions & 46 deletions cpp/ql/test/library-tests/ir/ir/aliased_ir.expected
Original file line number Diff line number Diff line change
Expand Up @@ -16810,39 +16810,39 @@ ir.cpp:
# 2307| r2307_90(glval<iterator<random_access_iterator_tag, String, ptrdiff_t, String *, String &>>) = CopyValue : r2307_78
#-----| Goto (back edge) -> Block 4

#-----| Block 6
#-----| r0_18(glval<vector<String>>) = CopyValue : r2307_2
#-----| r0_19(glval<unknown>) = FunctionAddress[~vector] :
#-----| v0_20(void) = Call[~vector] : func:r0_19, this:r0_18
#-----| m0_21(unknown) = ^CallSideEffect : ~m2307_57
#-----| m0_22(unknown) = Chi : total:m2307_57, partial:m0_21
#-----| v0_23(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m0_22
#-----| m0_24(vector<String>) = ^IndirectMayWriteSideEffect[-1] : &:r0_18
#-----| m0_25(unknown) = Chi : total:m0_22, partial:m0_24
# 2311| r2311_1(glval<String>) = VariableAddress[s] :
# 2311| m2311_2(String) = Uninitialized[s] : &:r2311_1
# 2311| m2311_3(unknown) = Chi : total:m0_25, partial:m2311_2
# 2311| r2311_4(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_5(glval<char[6]>) = StringConstant["hello"] :
# 2311| r2311_6(char *) = Convert : r2311_5
# 2311| v2311_7(void) = Call[String] : func:r2311_4, this:r2311_1, 0:r2311_6
# 2311| m2311_8(unknown) = ^CallSideEffect : ~m2311_3
# 2311| m2311_9(unknown) = Chi : total:m2311_3, partial:m2311_8
# 2311| v2311_10(void) = ^BufferReadSideEffect[0] : &:r2311_6, ~m2301_3
# 2311| m2311_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_1
# 2311| m2311_12(unknown) = Chi : total:m2311_9, partial:m2311_11
# 2311| r2311_13(glval<String>) = VariableAddress[s2] :
# 2311| m2311_14(String) = Uninitialized[s2] : &:r2311_13
# 2311| m2311_15(unknown) = Chi : total:m2311_12, partial:m2311_14
# 2311| r2311_16(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_17(glval<char[6]>) = StringConstant["world"] :
# 2311| r2311_18(char *) = Convert : r2311_17
# 2311| v2311_19(void) = Call[String] : func:r2311_16, this:r2311_13, 0:r2311_18
# 2311| m2311_20(unknown) = ^CallSideEffect : ~m2311_15
# 2311| m2311_21(unknown) = Chi : total:m2311_15, partial:m2311_20
# 2311| v2311_22(void) = ^BufferReadSideEffect[0] : &:r2311_18, ~m2301_3
# 2311| m2311_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_13
# 2311| m2311_24(unknown) = Chi : total:m2311_21, partial:m2311_23
# 2307| Block 6
# 2307| r2307_91(glval<vector<String>>) = CopyValue : r2307_2
# 2307| r2307_92(glval<unknown>) = FunctionAddress[~vector] :
# 2307| v2307_93(void) = Call[~vector] : func:r2307_92, this:r2307_91
# 2307| m2307_94(unknown) = ^CallSideEffect : ~m2307_57
# 2307| m2307_95(unknown) = Chi : total:m2307_57, partial:m2307_94
# 2307| v2307_96(void) = ^IndirectReadSideEffect[-1] : &:r2307_91, ~m2307_95
# 2307| m2307_97(vector<String>) = ^IndirectMayWriteSideEffect[-1] : &:r2307_91
# 2307| m2307_98(unknown) = Chi : total:m2307_95, partial:m2307_97
# 2311| r2311_1(glval<String>) = VariableAddress[s] :
# 2311| m2311_2(String) = Uninitialized[s] : &:r2311_1
# 2311| m2311_3(unknown) = Chi : total:m2307_98, partial:m2311_2
# 2311| r2311_4(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_5(glval<char[6]>) = StringConstant["hello"] :
# 2311| r2311_6(char *) = Convert : r2311_5
# 2311| v2311_7(void) = Call[String] : func:r2311_4, this:r2311_1, 0:r2311_6
# 2311| m2311_8(unknown) = ^CallSideEffect : ~m2311_3
# 2311| m2311_9(unknown) = Chi : total:m2311_3, partial:m2311_8
# 2311| v2311_10(void) = ^BufferReadSideEffect[0] : &:r2311_6, ~m2301_3
# 2311| m2311_11(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_1
# 2311| m2311_12(unknown) = Chi : total:m2311_9, partial:m2311_11
# 2311| r2311_13(glval<String>) = VariableAddress[s2] :
# 2311| m2311_14(String) = Uninitialized[s2] : &:r2311_13
# 2311| m2311_15(unknown) = Chi : total:m2311_12, partial:m2311_14
# 2311| r2311_16(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_17(glval<char[6]>) = StringConstant["world"] :
# 2311| r2311_18(char *) = Convert : r2311_17
# 2311| v2311_19(void) = Call[String] : func:r2311_16, this:r2311_13, 0:r2311_18
# 2311| m2311_20(unknown) = ^CallSideEffect : ~m2311_15
# 2311| m2311_21(unknown) = Chi : total:m2311_15, partial:m2311_20
# 2311| v2311_22(void) = ^BufferReadSideEffect[0] : &:r2311_18, ~m2301_3
# 2311| m2311_23(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_13
# 2311| m2311_24(unknown) = Chi : total:m2311_21, partial:m2311_23
#-----| Goto -> Block 7

# 2311| Block 7
Expand Down Expand Up @@ -17681,19 +17681,19 @@ ir.cpp:
# 2430| r2430_78(glval<iterator<random_access_iterator_tag, char, ptrdiff_t, char *, char &>>) = CopyValue : r2430_74
#-----| Goto (back edge) -> Block 10

#-----| Block 12
#-----| r0_18(glval<vector<char>>) = CopyValue : r2430_27
#-----| r0_19(glval<unknown>) = FunctionAddress[~vector] :
#-----| v0_20(void) = Call[~vector] : func:r0_19, this:r0_18
#-----| m0_21(unknown) = ^CallSideEffect : ~m2430_63
#-----| m0_22(unknown) = Chi : total:m2430_63, partial:m0_21
#-----| v0_23(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m0_22
#-----| m0_24(vector<char>) = ^IndirectMayWriteSideEffect[-1] : &:r0_18
#-----| m0_25(unknown) = Chi : total:m0_22, partial:m0_24
# 2432| v2432_1(void) = NoOp :
# 2410| v2410_5(void) = ReturnVoid :
# 2410| v2410_6(void) = AliasedUse : ~m0_22
# 2410| v2410_7(void) = ExitFunction :
# 2430| Block 12
# 2430| r2430_79(glval<vector<char>>) = CopyValue : r2430_27
# 2430| r2430_80(glval<unknown>) = FunctionAddress[~vector] :
# 2430| v2430_81(void) = Call[~vector] : func:r2430_80, this:r2430_79
# 2430| m2430_82(unknown) = ^CallSideEffect : ~m2430_63
# 2430| m2430_83(unknown) = Chi : total:m2430_63, partial:m2430_82
# 2430| v2430_84(void) = ^IndirectReadSideEffect[-1] : &:r2430_79, ~m2430_83
# 2430| m2430_85(vector<char>) = ^IndirectMayWriteSideEffect[-1] : &:r2430_79
# 2430| m2430_86(unknown) = Chi : total:m2430_83, partial:m2430_85
# 2432| v2432_1(void) = NoOp :
# 2410| v2410_5(void) = ReturnVoid :
# 2410| v2410_6(void) = AliasedUse : ~m2430_83
# 2410| v2410_7(void) = ExitFunction :

# 2410| Block 13
# 2410| v2410_8(void) = Unreached :
Expand Down
72 changes: 36 additions & 36 deletions cpp/ql/test/library-tests/ir/ir/raw_ir.expected
Original file line number Diff line number Diff line change
Expand Up @@ -15353,31 +15353,31 @@ ir.cpp:
# 2307| r2307_71(glval<iterator<random_access_iterator_tag, String, ptrdiff_t, String *, String &>>) = CopyValue : r2307_62
#-----| Goto (back edge) -> Block 4

#-----| Block 6
#-----| r0_17(glval<vector<String>>) = CopyValue : r2307_2
#-----| r0_18(glval<unknown>) = FunctionAddress[~vector] :
#-----| v0_19(void) = Call[~vector] : func:r0_18, this:r0_17
#-----| mu0_20(unknown) = ^CallSideEffect : ~m?
#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m?
#-----| mu0_22(vector<String>) = ^IndirectMayWriteSideEffect[-1] : &:r0_17
# 2311| r2311_1(glval<String>) = VariableAddress[s] :
# 2311| mu2311_2(String) = Uninitialized[s] : &:r2311_1
# 2311| r2311_3(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_4(glval<char[6]>) = StringConstant["hello"] :
# 2311| r2311_5(char *) = Convert : r2311_4
# 2311| v2311_6(void) = Call[String] : func:r2311_3, this:r2311_1, 0:r2311_5
# 2311| mu2311_7(unknown) = ^CallSideEffect : ~m?
# 2311| v2311_8(void) = ^BufferReadSideEffect[0] : &:r2311_5, ~m?
# 2311| mu2311_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_1
# 2311| r2311_10(glval<String>) = VariableAddress[s2] :
# 2311| mu2311_11(String) = Uninitialized[s2] : &:r2311_10
# 2311| r2311_12(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_13(glval<char[6]>) = StringConstant["world"] :
# 2311| r2311_14(char *) = Convert : r2311_13
# 2311| v2311_15(void) = Call[String] : func:r2311_12, this:r2311_10, 0:r2311_14
# 2311| mu2311_16(unknown) = ^CallSideEffect : ~m?
# 2311| v2311_17(void) = ^BufferReadSideEffect[0] : &:r2311_14, ~m?
# 2311| mu2311_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_10
# 2307| Block 6
# 2307| r2307_72(glval<vector<String>>) = CopyValue : r2307_2
# 2307| r2307_73(glval<unknown>) = FunctionAddress[~vector] :
# 2307| v2307_74(void) = Call[~vector] : func:r2307_73, this:r2307_72
# 2307| mu2307_75(unknown) = ^CallSideEffect : ~m?
# 2307| v2307_76(void) = ^IndirectReadSideEffect[-1] : &:r2307_72, ~m?
# 2307| mu2307_77(vector<String>) = ^IndirectMayWriteSideEffect[-1] : &:r2307_72
# 2311| r2311_1(glval<String>) = VariableAddress[s] :
# 2311| mu2311_2(String) = Uninitialized[s] : &:r2311_1
# 2311| r2311_3(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_4(glval<char[6]>) = StringConstant["hello"] :
# 2311| r2311_5(char *) = Convert : r2311_4
# 2311| v2311_6(void) = Call[String] : func:r2311_3, this:r2311_1, 0:r2311_5
# 2311| mu2311_7(unknown) = ^CallSideEffect : ~m?
# 2311| v2311_8(void) = ^BufferReadSideEffect[0] : &:r2311_5, ~m?
# 2311| mu2311_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_1
# 2311| r2311_10(glval<String>) = VariableAddress[s2] :
# 2311| mu2311_11(String) = Uninitialized[s2] : &:r2311_10
# 2311| r2311_12(glval<unknown>) = FunctionAddress[String] :
# 2311| r2311_13(glval<char[6]>) = StringConstant["world"] :
# 2311| r2311_14(char *) = Convert : r2311_13
# 2311| v2311_15(void) = Call[String] : func:r2311_12, this:r2311_10, 0:r2311_14
# 2311| mu2311_16(unknown) = ^CallSideEffect : ~m?
# 2311| v2311_17(void) = ^BufferReadSideEffect[0] : &:r2311_14, ~m?
# 2311| mu2311_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2311_10
#-----| Goto -> Block 7

# 2311| Block 7
Expand Down Expand Up @@ -16088,17 +16088,17 @@ ir.cpp:
# 2430| r2430_63(glval<iterator<random_access_iterator_tag, char, ptrdiff_t, char *, char &>>) = CopyValue : r2430_60
#-----| Goto (back edge) -> Block 11

#-----| Block 13
#-----| r0_17(glval<vector<char>>) = CopyValue : r2430_21
#-----| r0_18(glval<unknown>) = FunctionAddress[~vector] :
#-----| v0_19(void) = Call[~vector] : func:r0_18, this:r0_17
#-----| mu0_20(unknown) = ^CallSideEffect : ~m?
#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m?
#-----| mu0_22(vector<char>) = ^IndirectMayWriteSideEffect[-1] : &:r0_17
# 2432| v2432_1(void) = NoOp :
# 2410| v2410_4(void) = ReturnVoid :
# 2410| v2410_5(void) = AliasedUse : ~m?
# 2410| v2410_6(void) = ExitFunction :
# 2430| Block 13
# 2430| r2430_64(glval<vector<char>>) = CopyValue : r2430_21
# 2430| r2430_65(glval<unknown>) = FunctionAddress[~vector] :
# 2430| v2430_66(void) = Call[~vector] : func:r2430_65, this:r2430_64
# 2430| mu2430_67(unknown) = ^CallSideEffect : ~m?
# 2430| v2430_68(void) = ^IndirectReadSideEffect[-1] : &:r2430_64, ~m?
# 2430| mu2430_69(vector<char>) = ^IndirectMayWriteSideEffect[-1] : &:r2430_64
# 2432| v2432_1(void) = NoOp :
# 2410| v2410_4(void) = ReturnVoid :
# 2410| v2410_5(void) = AliasedUse : ~m?
# 2410| v2410_6(void) = ExitFunction :

# 2434| void param_with_destructor_by_value(ClassWithDestructor)
# 2434| Block 0
Expand Down

0 comments on commit 9bc04e7

Please sign in to comment.