Skip to content

Commit 98de4e2

Browse files
committed
C++: Handle destructors of if and switch initializer statements
1 parent 9cc287d commit 98de4e2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19815,6 +19815,12 @@ ir.cpp:
1981519815
# 2400| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1981619816
# 2400| Type = [VoidType] void
1981719817
# 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
1981819824
# 2400| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1981919825
# 2400| Type = [Class] ClassWithDestructor
1982019826
# 2400| ValueCategory = prvalue(load)
@@ -19843,6 +19849,12 @@ ir.cpp:
1984319849
# 2403| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1984419850
# 2403| Type = [VoidType] void
1984519851
# 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
1984619858
# 2403| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1984719859
# 2403| Type = [Class] ClassWithDestructor
1984819860
# 2403| ValueCategory = prvalue(load)
@@ -19912,6 +19924,12 @@ ir.cpp:
1991219924
# 2411| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1991319925
# 2411| Type = [VoidType] void
1991419926
# 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
1991519933
# 2411| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1991619934
# 2411| Type = [Class] ClassWithDestructor
1991719935
# 2411| ValueCategory = prvalue(load)

0 commit comments

Comments
 (0)