From: Raphael Isemann Date: Mon, 20 Aug 2018 15:51:41 +0000 (+0000) Subject: [ASTImporter] Test for importing condition variable from a ForStmt X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a2e99a914ddab10a489bbe9c099ab429706c3cb;p=clang [ASTImporter] Test for importing condition variable from a ForStmt Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: cfe-commits, martong Differential Revision: https://reviews.llvm.org/D50928 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340180 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Import/for-stmt/Inputs/F.cpp b/test/Import/for-stmt/Inputs/F.cpp index 2194c5ed1f..e93e35dd6b 100644 --- a/test/Import/for-stmt/Inputs/F.cpp +++ b/test/Import/for-stmt/Inputs/F.cpp @@ -3,6 +3,8 @@ void f() { ; for (int i = 0;;) continue; + for (; bool j = false;) + continue; for (int i = 0; i != 0; ++i) { i++; } diff --git a/test/Import/for-stmt/test.cpp b/test/Import/for-stmt/test.cpp index a926a9f489..95895ce6c1 100644 --- a/test/Import/for-stmt/test.cpp +++ b/test/Import/for-stmt/test.cpp @@ -16,6 +16,18 @@ // CHECK-NEXT: <> // CHECK-NEXT: ContinueStmt +// CHECK: ForStmt +// CHECK-NEXT: <> +// CHECK-NEXT: DeclStmt +// CHECK-NEXT: VarDecl +// CHECK-NEXT: CXXBoolLiteralExpr +// CHECK-NEXT: ImplicitCastExpr +// CHECK-NEXT: DeclRefExpr +// CHECK-SAME: 'j' +// CHECK-SAME: 'bool' +// CHECK-NEXT: <> +// CHECK-NEXT: ContinueStmt + // CHECK: ForStmt // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl