summaryrefslogtreecommitdiff
path: root/test/Import/cxx-member-pointers/test.cpp
blob: 253c90bdcf7e43b1abfe3f43d5a5f1609f47065c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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;
}