summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/Import/indirect-goto/Inputs/F.cpp6
-rw-r--r--clang/test/Import/indirect-goto/test.cpp10
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();
+}
OpenPOWER on IntegriCloud