Clang Project

clang_source_code/test/Import/cxx-member-pointers/test.cpp
1// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
2
3// CHECK: VarDecl
4// CHECK-SAME: int S::*
5// CHECK-NEXT: CallExpr
6// CHECK-NEXT: ImplicitCastExpr
7// CHECK-SAME: int S::*(*)()
8// CHECK-NEXT: DeclRefExpr
9// CHECK-SAME: int S::*()
10
11void expr() {
12  int S::*p = iptr();
13  S s;
14  s.i = 3;
15  int i = s.*p;
16}
17