diff options
author | Raphael Isemann <teemperor@gmail.com> | 2018-08-16 18:20:52 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2018-08-16 18:20:52 +0000 |
commit | bd07b01749bfb302e684b7835024ba0a0875e16d (patch) | |
tree | 8459da4472d6001f118e5bb79a29b826857c3bbe | |
parent | ca47e8d86b5a44e409374a6c550ec5cc1377ad38 (diff) |
[ASTImporter] Add test for DoStmt
Reviewers: a.sidorin, martong
Reviewed By: martong
Subscribers: rnkovacs, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50810
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339917 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Import/do-stmt/Inputs/F.cpp | 7 | ||||
-rw-r--r-- | test/Import/do-stmt/test.cpp | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/Import/do-stmt/Inputs/F.cpp b/test/Import/do-stmt/Inputs/F.cpp new file mode 100644 index 0000000000..a58efb3a25 --- /dev/null +++ b/test/Import/do-stmt/Inputs/F.cpp @@ -0,0 +1,7 @@ +void f() { + do + ; + while (true); + do { + } while (false); +} diff --git a/test/Import/do-stmt/test.cpp b/test/Import/do-stmt/test.cpp new file mode 100644 index 0000000000..8b1057dae6 --- /dev/null +++ b/test/Import/do-stmt/test.cpp @@ -0,0 +1,15 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s + +// CHECK: DoStmt +// CHECK-NEXT: NullStmt +// CHECK-NEXT: CXXBoolLiteralExpr +// CHECK-SAME: true + +// CHECK: DoStmt +// CHECK-NEXT: CompoundStmt +// CHECK-NEXT: CXXBoolLiteralExpr +// CHECK-SAME: false + +void expr() { + f(); +} |