teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin.
Repository: rC Clang https://reviews.llvm.org/D50812 Files: test/Import/for-stmt/Inputs/F.cpp test/Import/for-stmt/test.cpp Index: test/Import/for-stmt/test.cpp =================================================================== --- /dev/null +++ test/Import/for-stmt/test.cpp @@ -0,0 +1,38 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s + +// CHECK: ForStmt +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: NullStmt + +// CHECK: ForStmt +// CHECK-NEXT: DeclStmt +// CHECK-NEXT: VarDecl +// CHECK-NEXT: IntegerLiteral +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: ContinueStmt + +// CHECK: ForStmt +// CHECK-NEXT: DeclStmt +// CHECK-NEXT: VarDecl +// CHECK-NEXT: IntegerLiteral +// CHECK-NEXT: <<NULL>> + +// CHECK-NEXT: BinaryOperator +// CHECK-NEXT: ImplicitCastExpr +// CHECK-NEXT: DeclRefExpr +// CHECK-NEXT: IntegerLiteral + +// CHECK-NEXT: UnaryOperator +// CHECK-SAME: '++' +// CHECK-NEXT: DeclRefExpr + +// CHECK-NEXT: CompoundStmt + +void expr() { + f(); +} Index: test/Import/for-stmt/Inputs/F.cpp =================================================================== --- /dev/null +++ test/Import/for-stmt/Inputs/F.cpp @@ -0,0 +1,9 @@ +void f() { + for (;;) + ; + for (int i = 0;;) + continue; + for (int i = 0; i != 0; ++i) { + i++; + } +}
Index: test/Import/for-stmt/test.cpp =================================================================== --- /dev/null +++ test/Import/for-stmt/test.cpp @@ -0,0 +1,38 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s + +// CHECK: ForStmt +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: NullStmt + +// CHECK: ForStmt +// CHECK-NEXT: DeclStmt +// CHECK-NEXT: VarDecl +// CHECK-NEXT: IntegerLiteral +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: <<NULL>> +// CHECK-NEXT: ContinueStmt + +// CHECK: ForStmt +// CHECK-NEXT: DeclStmt +// CHECK-NEXT: VarDecl +// CHECK-NEXT: IntegerLiteral +// CHECK-NEXT: <<NULL>> + +// CHECK-NEXT: BinaryOperator +// CHECK-NEXT: ImplicitCastExpr +// CHECK-NEXT: DeclRefExpr +// CHECK-NEXT: IntegerLiteral + +// CHECK-NEXT: UnaryOperator +// CHECK-SAME: '++' +// CHECK-NEXT: DeclRefExpr + +// CHECK-NEXT: CompoundStmt + +void expr() { + f(); +} Index: test/Import/for-stmt/Inputs/F.cpp =================================================================== --- /dev/null +++ test/Import/for-stmt/Inputs/F.cpp @@ -0,0 +1,9 @@ +void f() { + for (;;) + ; + for (int i = 0;;) + continue; + for (int i = 0; i != 0; ++i) { + i++; + } +}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits