// RUN: %clang_cc1 -fsyntax-only -verify %s template struct A0 { struct B0; template struct C0 { struct D0; template struct E0; }; }; template int A0::B0::* f0(); template int A0::B1::* f1(); template int A0::C0::* f2(); // expected-error {{expected unqualified-id}} template int A0::C1::* f3(); // expected-error {{no member named 'C1' in 'A0'}} // expected-error@-1 {{expected ';' after top level declarator}} template int A0::template C2::* f4(); template int A0::template C0::D0::* f5(); template int A0::template C2::D1::* f6(); template int A0::template C0::E0::* f7(); // expected-error {{use 'template' keyword to treat 'E0' as a dependent template name}} // expected-error@-1 {{expected unqualified-id}} template int A0::template C2::E1::* f8(); // expected-error {{no member named 'C2' in 'A0'}} template int A0::template C0::template E0::* f9(); template int A0::template C2::template E1::* f10(); namespace TypoCorrection { template struct A { template struct Typo; // expected-note {{'Typo' declared here}} }; template int A::template typo::* f(); template int A::typo::* g(); // expected-error {{no template named 'typo' in 'TypoCorrection::A'; did you mean 'Typo'?}} // expected-error@-1 {{expected unqualified-id}} }