teemperor created this revision.
Herald added a subscriber: martong.
Herald added a reviewer: a.sidorin.

Repository:
  rC Clang

https://reviews.llvm.org/D50813

Files:
  test/Import/indirect-goto/Inputs/F.cpp
  test/Import/indirect-goto/test.cpp


Index: test/Import/indirect-goto/test.cpp
===================================================================
--- /dev/null
+++ 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();
+}
Index: test/Import/indirect-goto/Inputs/F.cpp
===================================================================
--- /dev/null
+++ test/Import/indirect-goto/Inputs/F.cpp
@@ -0,0 +1,6 @@
+void f() {
+  void const *l1_ptr = &&l1;
+  goto *l1_ptr;
+l1:
+  return;
+}


Index: test/Import/indirect-goto/test.cpp
===================================================================
--- /dev/null
+++ 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();
+}
Index: test/Import/indirect-goto/Inputs/F.cpp
===================================================================
--- /dev/null
+++ test/Import/indirect-goto/Inputs/F.cpp
@@ -0,0 +1,6 @@
+void f() {
+  void const *l1_ptr = &&l1;
+  goto *l1_ptr;
+l1:
+  return;
+}
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to