1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc struct C { 4*f4a2713aSLionel Sambuc static int (C::* a); 5*f4a2713aSLionel Sambuc }; 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc typedef void (C::*pmfc)(); 8*f4a2713aSLionel Sambuc g(pmfc)9*f4a2713aSLionel Sambucvoid g(pmfc) { 10*f4a2713aSLionel Sambuc C *c; 11*f4a2713aSLionel Sambuc c->*pmfc(); // expected-error {{invalid use of pointer to member type after ->*}} 12*f4a2713aSLionel Sambuc C c1; 13*f4a2713aSLionel Sambuc c1.*pmfc(); // expected-error {{invalid use of pointer to member type after .*}} 14*f4a2713aSLionel Sambuc c->*(pmfc()); // expected-error {{invalid use of pointer to member type after ->*}} 15*f4a2713aSLionel Sambuc c1.*((pmfc())); // expected-error {{invalid use of pointer to member type after .*}} 16*f4a2713aSLionel Sambuc } 17*f4a2713aSLionel Sambuc a(C * x)18*f4a2713aSLionel Sambucint a(C* x) { 19*f4a2713aSLionel Sambuc return x->*C::a; 20*f4a2713aSLionel Sambuc } 21*f4a2713aSLionel Sambuc 22