[PATCH] D50731: [ASTImporter] Add test for ExprWithCleanups
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 14 13:01:55 PDT 2018
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();
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50731.160674.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180814/25009967/attachment.bin>
More information about the cfe-commits
mailing list