teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin.
Repository: rC Clang https://reviews.llvm.org/D50811 Files: test/Import/while-stmt/Inputs/F.cpp test/Import/while-stmt/test.cpp Index: test/Import/while-stmt/test.cpp =================================================================== --- /dev/null +++ test/Import/while-stmt/test.cpp @@ -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(); +} Index: test/Import/while-stmt/Inputs/F.cpp =================================================================== --- /dev/null +++ test/Import/while-stmt/Inputs/F.cpp @@ -0,0 +1,8 @@ +void f() { + while (false) + ; + while (false) { + } + while (bool ini = true) + ; +}
Index: test/Import/while-stmt/test.cpp =================================================================== --- /dev/null +++ test/Import/while-stmt/test.cpp @@ -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(); +} Index: test/Import/while-stmt/Inputs/F.cpp =================================================================== --- /dev/null +++ test/Import/while-stmt/Inputs/F.cpp @@ -0,0 +1,8 @@ +void f() { + while (false) + ; + while (false) { + } + while (bool ini = true) + ; +}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits