r339916 - [ASTImporter] Add test for WhileStmt
Raphael Isemann via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 16 11:20:05 PDT 2018
Author: teemperor
Date: Thu Aug 16 11:20:05 2018
New Revision: 339916
URL: http://llvm.org/viewvc/llvm-project?rev=339916&view=rev
Log:
[ASTImporter] Add test for WhileStmt
Reviewers: a.sidorin, martong
Reviewed By: martong
Subscribers: rnkovacs, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50811
Added:
cfe/trunk/test/Import/while-stmt/
cfe/trunk/test/Import/while-stmt/Inputs/
cfe/trunk/test/Import/while-stmt/Inputs/F.cpp
cfe/trunk/test/Import/while-stmt/test.cpp
Added: cfe/trunk/test/Import/while-stmt/Inputs/F.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/while-stmt/Inputs/F.cpp?rev=339916&view=auto
==============================================================================
--- cfe/trunk/test/Import/while-stmt/Inputs/F.cpp (added)
+++ cfe/trunk/test/Import/while-stmt/Inputs/F.cpp Thu Aug 16 11:20:05 2018
@@ -0,0 +1,8 @@
+void f() {
+ while (false)
+ ;
+ while (false) {
+ }
+ while (bool ini = true)
+ ;
+}
Added: cfe/trunk/test/Import/while-stmt/test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/while-stmt/test.cpp?rev=339916&view=auto
==============================================================================
--- cfe/trunk/test/Import/while-stmt/test.cpp (added)
+++ cfe/trunk/test/Import/while-stmt/test.cpp Thu Aug 16 11:20:05 2018
@@ -0,0 +1,23 @@
+// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s
+
+// CHECK: WhileStmt
+// CHECK-NEXT: <<NULL>>
+// CHECK-NEXT: CXXBoolLiteralExpr
+// CHECK-NEXT: NullStmt
+
+// CHECK: WhileStmt
+// CHECK-NEXT: <<NULL>>
+// CHECK-NEXT: CXXBoolLiteralExpr
+// CHECK-NEXT: CompoundStmt
+
+// CHECK: WhileStmt
+// CHECK-NEXT: DeclStmt
+// CHECK-NEXT: VarDecl
+// CHECK-NEXT: CXXBoolLiteralExpr
+// CHECK-NEXT: ImplicitCastExpr
+// CHECK-NEXT: DeclRefExpr
+// CHECK-NEXT: NullStmt
+
+void expr() {
+ f();
+}
More information about the cfe-commits
mailing list