Index: test/Import/expr-with-cleanups/Inputs/S.cpp =================================================================== --- test/Import/expr-with-cleanups/Inputs/S.cpp +++ test/Import/expr-with-cleanups/Inputs/S.cpp @@ -0,0 +1,8 @@ +struct RAII { + int i = 0; + RAII() { i++; } + ~RAII() { i--; } +}; +void f() { + RAII(); +} Index: test/Import/expr-with-cleanups/test.cpp =================================================================== --- test/Import/expr-with-cleanups/test.cpp +++ test/Import/expr-with-cleanups/test.cpp @@ -0,0 +1,8 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s +// CHECK: ExprWithCleanups +// CHECK-SAME: 'RAII' +// CHECK-NEXT: CXXBindTemporaryExpr + +void expr() { + f(); +}