blob: ed52d47f2cda7b0aaa1485c10efb2fc399eba1ea [file] [log] [blame]
Fariborz Jahanian4657a992009-10-06 23:08:05 +00001// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
2
3struct A {};
4
5struct B {
6 operator A*();
7};
8
9struct C : B {
10
11};
12
13
14void foo(C c, B b, int A::* pmf) {
Fariborz Jahanianca4fb042009-10-07 17:26:09 +000015 int j = c->*pmf;
Fariborz Jahanian4657a992009-10-06 23:08:05 +000016 int i = b->*pmf;
17}
18
Fariborz Jahaniana9cca892009-10-15 17:14:05 +000019struct D {
20 operator const D *();
21};
22
23struct DPtr {
24 operator volatile int D::*();
25};
26
27int test(D d, DPtr dptr) {
28 return d->*dptr;
29}
30