// RUN: clang-cc -fsyntax-only -verify %s struct Y { int x; }; template struct X1 { int f(T* ptr, int T::*pm) { // expected-error{{member pointer}} return ptr->*pm; } }; template struct X1; template struct X1; // expected-note{{instantiation}} template struct X2 { T f(Class &obj, T Class::*pm) { // expected-error{{to a reference}} \ // expected-error{{member pointer to void}} return obj.*pm; } }; template struct X2; template struct X2; // expected-note{{instantiation}} template struct X2; // expected-note{{instantiation}}