diff options
author | Raphael Isemann <teemperor@gmail.com> | 2018-08-15 22:51:37 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2018-08-15 22:51:37 +0000 |
commit | 380e372b13a5f13119594fea6e862fd4f55ef1ea (patch) | |
tree | 0adbc0f025de9969cbf53a4cebf11803a3a6b870 | |
parent | 9ff2d7d56ace40c1b2fc15a9ae41e4fda04cbbcb (diff) | |
download | bcm5719-llvm-380e372b13a5f13119594fea6e862fd4f55ef1ea.tar.gz bcm5719-llvm-380e372b13a5f13119594fea6e862fd4f55ef1ea.zip |
[ASTImporter] Add test for ExprWithCleanups
Reviewers: a.sidorin, a_sidorin
Reviewed By: a_sidorin
Subscribers: a_sidorin, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50731
llvm-svn: 339830
-rw-r--r-- | clang/test/Import/expr-with-cleanups/Inputs/S.cpp | 8 | ||||
-rw-r--r-- | clang/test/Import/expr-with-cleanups/test.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Import/expr-with-cleanups/Inputs/S.cpp b/clang/test/Import/expr-with-cleanups/Inputs/S.cpp new file mode 100644 index 00000000000..7b69f48f681 --- /dev/null +++ b/clang/test/Import/expr-with-cleanups/Inputs/S.cpp @@ -0,0 +1,8 @@ +struct RAII { + int i = 0; + RAII() { i++; } + ~RAII() { i--; } +}; +void f() { + RAII(); +} diff --git a/clang/test/Import/expr-with-cleanups/test.cpp b/clang/test/Import/expr-with-cleanups/test.cpp new file mode 100644 index 00000000000..79b76f414ec --- /dev/null +++ b/clang/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(); +} |