1 // RUN: clang-cc -fsyntax-only -verify %s
6 struct base // expected-note{{object type}}
20 member * operator->() { return 0; }
26 middleman operator->() { return middleman(); }
46 a.B::base::x(); // expected-error{{use of undeclared identifier 'B'}}
51 a.bad::x(); // expected-error{{type 'struct bad' is not a direct or virtual base of ''struct A::sub''}}
67 a->B::base::x(); // expected-error{{use of undeclared identifier 'B'}}
72 a->bad::x(); // expected-error{{type 'struct bad' is not a direct or virtual base of ''struct A::sub''}}
76 (*a)->A::member::foo();
82 i.foo(); // expected-error{{member reference base type 'int' is not a structure or union}}
88 typedef A::member base; // expected-note{{current scope}}
89 a->base::x(); // expected-error{{ambiguous}}
95 typedef A::B::base base;
110 a.bad::x(); // expected-error{{direct or virtual}}
114 fun5<A::sub>(); // expected-note{{instantiation}}
123 a.B::base::x(); // expected-error{{use of undeclared identifier 'B'}}
127 fun6<A::sub>(); // expected-note{{instantiation}}