Skip to content

Commit eca6c00

Browse files
authored
Merge pull request #16014 from jketema/destructors20
C++: Handle destructors of range-based for-loop, if, and switch initializer statements
2 parents c219b1a + 98de4e2 commit eca6c00

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17357,6 +17357,12 @@ ir.cpp:
1735717357
# 2201| getArgument(0): [VariableAccess] x
1735817358
# 2201| Type = [Class] ClassWithDestructor
1735917359
# 2201| ValueCategory = prvalue(load)
17360+
# 2201| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
17361+
# 2201| Type = [VoidType] void
17362+
# 2201| ValueCategory = prvalue
17363+
# 2201| getQualifier(): [ReuseExpr] reuse of temporary object
17364+
# 2201| Type = [Class] ClassWithDestructor
17365+
# 2201| ValueCategory = xvalue
1736017366
# 2201| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object
1736117367
# 2201| Type = [Class] ClassWithDestructor
1736217368
# 2201| ValueCategory = lvalue
@@ -17489,6 +17495,12 @@ ir.cpp:
1748917495
# 2204| getArgument(0): [VariableAccess] x
1749017496
# 2204| Type = [Class] ClassWithDestructor
1749117497
# 2204| ValueCategory = prvalue(load)
17498+
# 2204| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
17499+
# 2204| Type = [VoidType] void
17500+
# 2204| ValueCategory = prvalue
17501+
# 2204| getQualifier(): [ReuseExpr] reuse of temporary object
17502+
# 2204| Type = [Class] ClassWithDestructor
17503+
# 2204| ValueCategory = xvalue
1749217504
# 2204| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object
1749317505
# 2204| Type = [Class] ClassWithDestructor
1749417506
# 2204| ValueCategory = lvalue
@@ -17802,6 +17814,12 @@ ir.cpp:
1780217814
# 2215| getArgument(0): [VariableAccess] x
1780317815
# 2215| Type = [Class] ClassWithDestructor
1780417816
# 2215| ValueCategory = prvalue(load)
17817+
# 2215| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
17818+
# 2215| Type = [VoidType] void
17819+
# 2215| ValueCategory = prvalue
17820+
# 2215| getQualifier(): [ReuseExpr] reuse of temporary object
17821+
# 2215| Type = [Class] ClassWithDestructor
17822+
# 2215| ValueCategory = xvalue
1780517823
# 2215| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object
1780617824
# 2215| Type = [Class] ClassWithDestructor
1780717825
# 2215| ValueCategory = lvalue
@@ -19797,6 +19815,12 @@ ir.cpp:
1979719815
# 2400| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1979819816
# 2400| Type = [VoidType] void
1979919817
# 2400| ValueCategory = prvalue
19818+
# 2400| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
19819+
# 2400| Type = [VoidType] void
19820+
# 2400| ValueCategory = prvalue
19821+
# 2400| getQualifier(): [ReuseExpr] reuse of temporary object
19822+
# 2400| Type = [Class] ClassWithDestructor
19823+
# 2400| ValueCategory = xvalue
1980019824
# 2400| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1980119825
# 2400| Type = [Class] ClassWithDestructor
1980219826
# 2400| ValueCategory = prvalue(load)
@@ -19825,6 +19849,12 @@ ir.cpp:
1982519849
# 2403| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1982619850
# 2403| Type = [VoidType] void
1982719851
# 2403| ValueCategory = prvalue
19852+
# 2403| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
19853+
# 2403| Type = [VoidType] void
19854+
# 2403| ValueCategory = prvalue
19855+
# 2403| getQualifier(): [ReuseExpr] reuse of temporary object
19856+
# 2403| Type = [Class] ClassWithDestructor
19857+
# 2403| ValueCategory = xvalue
1982819858
# 2403| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1982919859
# 2403| Type = [Class] ClassWithDestructor
1983019860
# 2403| ValueCategory = prvalue(load)
@@ -19894,6 +19924,12 @@ ir.cpp:
1989419924
# 2411| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1989519925
# 2411| Type = [VoidType] void
1989619926
# 2411| ValueCategory = prvalue
19927+
# 2411| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
19928+
# 2411| Type = [VoidType] void
19929+
# 2411| ValueCategory = prvalue
19930+
# 2411| getQualifier(): [ReuseExpr] reuse of temporary object
19931+
# 2411| Type = [Class] ClassWithDestructor
19932+
# 2411| ValueCategory = xvalue
1989719933
# 2411| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1989819934
# 2411| Type = [Class] ClassWithDestructor
1989919935
# 2411| ValueCategory = prvalue(load)
@@ -19933,6 +19969,12 @@ ir.cpp:
1993319969
# 2416| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1993419970
# 2416| Type = [VoidType] void
1993519971
# 2416| ValueCategory = prvalue
19972+
# 2416| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
19973+
# 2416| Type = [VoidType] void
19974+
# 2416| ValueCategory = prvalue
19975+
# 2416| getQualifier(): [ReuseExpr] reuse of temporary object
19976+
# 2416| Type = [Class] ClassWithDestructor
19977+
# 2416| ValueCategory = xvalue
1993619978
# 2416| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1993719979
# 2416| Type = [Class] ClassWithDestructor
1993819980
# 2416| ValueCategory = prvalue(load)

0 commit comments

Comments
 (0)