Reviewers: a.sidorin, martong
Reviewed By: martong
Subscribers: rnkovacs, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50811
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339916
91177308-0d34-0410-b5e6-
96231b3b80d8
--- /dev/null
+void f() {
+ while (false)
+ ;
+ while (false) {
+ }
+ while (bool ini = true)
+ ;
+}
--- /dev/null
+// 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();
+}