[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
This commit is contained in:
Raphael Isemann 2018-08-16 18:19:21 +00:00
parent 642de8a088
commit 003140d1b2
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,6 @@
void f() {
void const *l1_ptr = &&l1;
goto *l1_ptr;
l1:
return;
}

View File

@ -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();
}