Skip to content

Commit 9cc287d

Browse files
committed
C++: Handle destructors of range-based for-loop initializer statements
1 parent be245dd commit 9cc287d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 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
@@ -19933,6 +19951,12 @@ ir.cpp:
1993319951
# 2416| getQualifier(): [ConstructorCall] call to ClassWithDestructor
1993419952
# 2416| Type = [VoidType] void
1993519953
# 2416| ValueCategory = prvalue
19954+
# 2416| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor
19955+
# 2416| Type = [VoidType] void
19956+
# 2416| ValueCategory = prvalue
19957+
# 2416| getQualifier(): [ReuseExpr] reuse of temporary object
19958+
# 2416| Type = [Class] ClassWithDestructor
19959+
# 2416| ValueCategory = xvalue
1993619960
# 2416| getQualifier().getFullyConverted(): [TemporaryObjectExpr] temporary object
1993719961
# 2416| Type = [Class] ClassWithDestructor
1993819962
# 2416| ValueCategory = prvalue(load)

0 commit comments

Comments
 (0)