summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ptr-to-datamember.cpp
blob: 86c771a8b0a21b5d821df98f3416e7595599bf46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: clang-cc -emit-llvm -o - %s

extern "C" int printf(...);

class A {
public:
  A() : f(1.0), d(2.0), Ai(100) {}
  float f;
  double d;
  int Ai;
}; 

int main() 
{
  A a1;
  int A::* pa = &A::Ai;
  float A::* pf = &A::f;
  double A::* pd = &A::d;
  printf("%d %d %d\n", &A::Ai, &A::f, &A::d);

  // FIXME. NYI
  //  printf(" %d, %f, %f  \n", a1.*pa, a1.f, a1.d);
}


OpenPOWER on IntegriCloud