diff options
author | Raphael Isemann <teemperor@gmail.com> | 2018-08-16 18:19:21 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2018-08-16 18:19:21 +0000 |
commit | 003140d1b2bfd9b9b0a88582eb426c0912c5f7f2 (patch) | |
tree | 0912a83d5d669cd0b6b5408b5b44cc5846351f5d /clang/test | |
parent | 642de8a0880f7788e52ec4cc0cb253324e2d8796 (diff) | |
download | bcm5719-llvm-003140d1b2bfd9b9b0a88582eb426c0912c5f7f2.tar.gz bcm5719-llvm-003140d1b2bfd9b9b0a88582eb426c0912c5f7f2.zip |
[ASTImporter] Add test for IndirectGotoStmt
Reviewers: a.sidorin, martong
Reviewed By: martong
Subscribers: rnkovacs, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50813
llvm-svn: 339915
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Import/indirect-goto/Inputs/F.cpp | 6 | ||||
-rw-r--r-- | clang/test/Import/indirect-goto/test.cpp | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Import/indirect-goto/Inputs/F.cpp b/clang/test/Import/indirect-goto/Inputs/F.cpp new file mode 100644 index 00000000000..368b6db40da --- /dev/null +++ b/clang/test/Import/indirect-goto/Inputs/F.cpp @@ -0,0 +1,6 @@ +void f() { + void const *l1_ptr = &&l1; + goto *l1_ptr; +l1: + return; +} diff --git a/clang/test/Import/indirect-goto/test.cpp b/clang/test/Import/indirect-goto/test.cpp new file mode 100644 index 00000000000..62be49eea6b --- /dev/null +++ b/clang/test/Import/indirect-goto/test.cpp @@ -0,0 +1,10 @@ +// RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s + +// CHECK: IndirectGotoStmt +// CHECK-NEXT: ImplicitCastExpr +// CHECK-NEXT: DeclRefExpr +// CHECK-SAME: 'l1_ptr' + +void expr() { + f(); +} |