// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused-comparison %s
// PR8439
classA{};classB{public:
A & m;};classBase{public:
B &f();};classDerived1:publicBase{};classDerived2:publicBase{};classX:publicB,publicDerived2,publicDerived1{public:virtualvoidg();};voidX::g(){
m.f<int>();// expected-error{{no member named 'f' in 'A'}} \
// expected-error{{expected '(' for function-style cast}} \
// expected-error{{expected expression}}
}namespacePR11134{template<typename Derived>classA;template<typename Derived>classB:A<Derived>{typedef A<Derived>Base;using Base::member;int member;};}namespaceAddrOfMember{structA{int X;};typedefint(A::*P);template<typename T>structS:T{voidf(){P(&T::X)// expected-error {{cannot cast from type 'int *' to member pointer type 'AddrOfMember::P'}}
==&A::X;}};voidg(){S<A>().f();// ok, &T::X is 'int (A::*)', not 'int *', even though T is a base class
}structB:A{staticint X;};voidh(){S<B>().f();// expected-note {{here}}
}}