// RUN: %clang_cc1 -fsyntax-only -verify %s
// rdar://problem/8347416
namespacetest0{structA{voidfoo(void(A::*)(int));// expected-note {{passing argument to parameter here}}
template<typename T>voidg(T);voidtest(){foo(&g<int>);// expected-error-re {{cannot form member pointer of type 'void (test0::A::*)(int){{( __attribute__\(\(thiscall\)\))?}}' without '&' and class name}}
}};}// This should succeed.
namespacetest1{structA{staticvoidf(void(A::*)());staticvoidf(void(*)(int));voidg();staticvoidg(int);voidtest(){f(&g);}};}// Also rdar://problem/8347416
namespacetest2{structA{staticintfoo(short);staticintfoo(float);intfoo(int);intfoo(double);voidtest();};voidA::test(){// FIXME: The error message in this case is less than clear, we can do
// better.
int(A::*ptr)(int)=&(A::foo);// expected-error {{cannot create a non-constant pointer to member function}}
}}