1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 2 // expected-no-diagnostics 3 4 struct A {}; 5 6 struct B { 7 operator A*(); 8 }; 9 10 struct C : B { 11 12 }; 13 14 foo(C c,B b,int A::* pmf)15void foo(C c, B b, int A::* pmf) { 16 int j = c->*pmf; 17 int i = b->*pmf; 18 } 19 20 struct D { 21 operator const D *(); 22 }; 23 24 struct DPtr { 25 operator volatile int D::*(); 26 }; 27 test(D d,DPtr dptr)28int test(D d, DPtr dptr) { 29 return d->*dptr; 30 } 31 32