[PATCH] D50928: [ASTImporter] Test for importing condition variable from a ForStmt

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 17 15:11:07 PDT 2018


teemperor created this revision.
Herald added a subscriber: martong.
Herald added a reviewer: a.sidorin.

Repository:
  rC Clang

https://reviews.llvm.org/D50928

Files:
  test/Import/for-stmt/Inputs/F.cpp
  test/Import/for-stmt/test.cpp


Index: test/Import/for-stmt/test.cpp
===================================================================
--- test/Import/for-stmt/test.cpp
+++ test/Import/for-stmt/test.cpp
@@ -16,6 +16,18 @@
 // CHECK-NEXT: <<NULL>>
 // CHECK-NEXT: ContinueStmt
 
+// CHECK: ForStmt
+// CHECK-NEXT: <<NULL>>
+// CHECK-NEXT: DeclStmt
+// CHECK-NEXT: VarDecl
+// CHECK-NEXT: CXXBoolLiteralExpr
+// CHECK-NEXT: ImplicitCastExpr
+// CHECK-NEXT: DeclRefExpr
+// CHECK-SAME: 'j'
+// CHECK-SAME: 'bool'
+// CHECK-NEXT: <<NULL>>
+// CHECK-NEXT: ContinueStmt
+
 // CHECK: ForStmt
 // CHECK-NEXT: DeclStmt
 // CHECK-NEXT: VarDecl
Index: test/Import/for-stmt/Inputs/F.cpp
===================================================================
--- test/Import/for-stmt/Inputs/F.cpp
+++ test/Import/for-stmt/Inputs/F.cpp
@@ -3,6 +3,8 @@
     ;
   for (int i = 0;;)
     continue;
+  for (; bool j = false;)
+    continue;
   for (int i = 0; i != 0; ++i) {
     i++;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50928.161342.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180817/f41334ff/attachment.bin>


More information about the cfe-commits mailing list