// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: Access control checks namespace PR5820 { // also struct Base { void Foo(); int Member; }; struct D1 : public Base {}; struct D2 : public Base {}; struct Derived : public D1, public D2 { void Inner(); }; void Test() { Derived d; d.D1::Foo(); d.D1::Member = 17; } void Derived::Inner() { D1::Foo(); D1::Member = 42; this->D1::Foo(); this->D1::Member = 42; } } template struct BaseT { void Foo(); // expected-note{{found by ambiguous name lookup}} int Member; }; template struct Derived1T : BaseT { }; template struct Derived2T : BaseT { }; template struct DerivedT : public Derived1T, public Derived2T { void Inner(); }; template void DerivedT::Inner() { Derived1T::Foo(); Derived2T::Member = 42; this->Derived1T::Foo(); this->Derived2T::Member = 42; this->Foo(); // expected-error{{non-static member 'Foo' found in multiple base-class subobjects of type 'BaseT'}} } template void Test(DerivedT d) { d.template Derived1T::Foo(); d.template Derived2T::Member = 17; d.Inner(); // expected-note{{in instantiation}} } template void Test(DerivedT);