teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin.
Repository: rC Clang https://reviews.llvm.org/D50731 Files: test/Import/expr-with-cleanups/Inputs/S.cpp test/Import/expr-with-cleanups/test.cpp Index: test/Import/expr-with-cleanups/test.cpp =================================================================== --- /dev/null +++ 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(); +} Index: test/Import/expr-with-cleanups/Inputs/S.cpp =================================================================== --- /dev/null +++ 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 =================================================================== --- /dev/null +++ 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(); +} Index: test/Import/expr-with-cleanups/Inputs/S.cpp =================================================================== --- /dev/null +++ test/Import/expr-with-cleanups/Inputs/S.cpp @@ -0,0 +1,8 @@ +struct RAII { + int i = 0; + RAII() { i++; } + ~RAII() { i--; } +}; +void f() { + RAII(); +}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits