llvm-for-llvmta/tools/clang/test/Import/cxx-member-pointers/test.cpp

17 lines
344 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
// CHECK: VarDecl
// CHECK-SAME: int S::*
// CHECK-NEXT: CallExpr
// CHECK-NEXT: ImplicitCastExpr
// CHECK-SAME: int S::*(*)()
// CHECK-NEXT: DeclRefExpr
// CHECK-SAME: int S::*()
void expr() {
int S::*p = iptr();
S s;
s.i = 3;
int i = s.*p;
}