r339915 - [ASTImporter] Add test for IndirectGotoStmt

Raphael Isemann via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 11:19:21 PDT 2018


Author: teemperor
Date: Thu Aug 16 11:19:21 2018
New Revision: 339915

URL: http://llvm.org/viewvc/llvm-project?rev=339915&view=rev
Log:
[ASTImporter] Add test for IndirectGotoStmt

Reviewers: a.sidorin, martong

Reviewed By: martong

Subscribers: rnkovacs, martong, cfe-commits

Differential Revision: https://reviews.llvm.org/D50813

Added:
    cfe/trunk/test/Import/indirect-goto/
    cfe/trunk/test/Import/indirect-goto/Inputs/
    cfe/trunk/test/Import/indirect-goto/Inputs/F.cpp
    cfe/trunk/test/Import/indirect-goto/test.cpp

Added: cfe/trunk/test/Import/indirect-goto/Inputs/F.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/indirect-goto/Inputs/F.cpp?rev=339915&view=auto
==============================================================================
--- cfe/trunk/test/Import/indirect-goto/Inputs/F.cpp (added)
+++ cfe/trunk/test/Import/indirect-goto/Inputs/F.cpp Thu Aug 16 11:19:21 2018
@@ -0,0 +1,6 @@
+void f() {
+  void const *l1_ptr = &&l1;
+  goto *l1_ptr;
+l1:
+  return;
+}

Added: cfe/trunk/test/Import/indirect-goto/test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/indirect-goto/test.cpp?rev=339915&view=auto
==============================================================================
--- cfe/trunk/test/Import/indirect-goto/test.cpp (added)
+++ cfe/trunk/test/Import/indirect-goto/test.cpp Thu Aug 16 11:19:21 2018
@@ -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();
+}




More information about the cfe-commits mailing list