Author: teemperor
Date: Thu Aug 16 11:20:52 2018
New Revision: 339917

URL: http://llvm.org/viewvc/llvm-project?rev=339917&view=rev
Log:
[ASTImporter] Add test for DoStmt

Reviewers: a.sidorin, martong

Reviewed By: martong

Subscribers: rnkovacs, martong, cfe-commits

Differential Revision: https://reviews.llvm.org/D50810

Added:
    cfe/trunk/test/Import/do-stmt/
    cfe/trunk/test/Import/do-stmt/Inputs/
    cfe/trunk/test/Import/do-stmt/Inputs/F.cpp
    cfe/trunk/test/Import/do-stmt/test.cpp

Added: cfe/trunk/test/Import/do-stmt/Inputs/F.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/do-stmt/Inputs/F.cpp?rev=339917&view=auto
==============================================================================
--- cfe/trunk/test/Import/do-stmt/Inputs/F.cpp (added)
+++ cfe/trunk/test/Import/do-stmt/Inputs/F.cpp Thu Aug 16 11:20:52 2018
@@ -0,0 +1,7 @@
+void f() {
+  do
+    ;
+  while (true);
+  do {
+  } while (false);
+}

Added: cfe/trunk/test/Import/do-stmt/test.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/do-stmt/test.cpp?rev=339917&view=auto
==============================================================================
--- cfe/trunk/test/Import/do-stmt/test.cpp (added)
+++ cfe/trunk/test/Import/do-stmt/test.cpp Thu Aug 16 11:20:52 2018
@@ -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();
+}


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to