[PATCH] D50810: [ASTImporter] Add test for DoStmt

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 15 14:31:51 PDT 2018


teemperor created this revision.
Herald added a subscriber: martong.
Herald added a reviewer: a.sidorin.

Repository:
  rC Clang

https://reviews.llvm.org/D50810

Files:
  test/Import/do-stmt/Inputs/F.cpp
  test/Import/do-stmt/test.cpp


Index: test/Import/do-stmt/test.cpp
===================================================================
--- /dev/null
+++ test/Import/do-stmt/test.cpp
@@ -0,0 +1,15 @@
+// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
+
+// CHECK: DoStmt
+// CHECK-NEXT: NullStmt
+// CHECK-NEXT: CXXBoolLiteralExpr
+// CHECK-SAME: true
+
+// CHECK: DoStmt
+// CHECK-NEXT: CompoundStmt
+// CHECK-NEXT: CXXBoolLiteralExpr
+// CHECK-SAME: false
+
+void expr() {
+  f();
+}
Index: test/Import/do-stmt/Inputs/F.cpp
===================================================================
--- /dev/null
+++ test/Import/do-stmt/Inputs/F.cpp
@@ -0,0 +1,7 @@
+void f() {
+  do
+    ;
+  while (true);
+  do {
+  } while (false);
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50810.160918.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180815/fc63d1e7/attachment-0001.bin>


More information about the cfe-commits mailing list