r339830 - [ASTImporter] Add test for ExprWithCleanups
Raphael Isemann via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 15:51:37 PDT 2018
Author: teemperor
Date: Wed Aug 15 15:51:37 2018
New Revision: 339830
URL: http://llvm.org/viewvc/llvm-project?rev=339830&view=rev
Log:
[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
Added:
cfe/trunk/test/Import/expr-with-cleanups/
cfe/trunk/test/Import/expr-with-cleanups/Inputs/
cfe/trunk/test/Import/expr-with-cleanups/Inputs/S.cpp
cfe/trunk/test/Import/expr-with-cleanups/test.cpp
Added: cfe/trunk/test/Import/expr-with-cleanups/Inputs/S.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/expr-with-cleanups/Inputs/S.cpp?rev=339830&view=auto
==============================================================================
--- cfe/trunk/test/Import/expr-with-cleanups/Inputs/S.cpp (added)
+++ cfe/trunk/test/Import/expr-with-cleanups/Inputs/S.cpp Wed Aug 15 15:51:37 2018
@@ -0,0 +1,8 @@
+struct RAII {
+ int i = 0;
+ RAII() { i++; }
+ ~RAII() { i--; }
+};
+void f() {
+ RAII();
+}
Added: cfe/trunk/test/Import/expr-with-cleanups/test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/expr-with-cleanups/test.cpp?rev=339830&view=auto
==============================================================================
--- cfe/trunk/test/Import/expr-with-cleanups/test.cpp (added)
+++ cfe/trunk/test/Import/expr-with-cleanups/test.cpp Wed Aug 15 15:51:37 2018
@@ -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();
+}
More information about the cfe-commits
mailing list