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

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 20 08:52:32 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC340180: [ASTImporter] Test for importing condition variable from a ForStmt (authored by teemperor, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50928?vs=161342&id=161493#toc

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/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++;
   }
Index: test/Import/for-stmt/test.cpp
===================================================================
--- test/Import/for-stmt/test.cpp
+++ test/Import/for-stmt/test.cpp
@@ -17,6 +17,18 @@
 // 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
 // CHECK-NEXT: IntegerLiteral


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50928.161493.patch
Type: text/x-patch
Size: 945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180820/768fef92/attachment.bin>


More information about the cfe-commits mailing list