// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s -Wno-microsoft // RUN: %clang_cc1 -fms-extensions -fdelayed-template-parsing -fsyntax-only -verify %s -Wno-microsoft class A { public: template struct X { typedef int x; }; X::x a; // expected-note {{implicit instantiation first required here}} template<> struct X; // expected-error {{explicit specialization of 'A::X' after instantiation}} template<> struct X; // expected-note {{forward declaration}} X::x b; // expected-error {{incomplete type 'A::X' named in nested name specifier}} template<> struct X { typedef int y; }; X::y c; template<> struct X {}; // expected-note {{previous definition is here}} template<> struct X {}; // expected-error {{redefinition of 'A::X'}} }; A::X::x axv; A::X::x axf; // expected-error {{no type named 'x'}} template class B { public: template struct X { typedef int x; }; typename X::x a; // expected-note {{implicit instantiation first required here}} template<> struct X; // expected-error {{explicit specialization of 'X' after instantiation}} template<> struct X; // expected-note {{forward declaration}} typename X::x b; // expected-error {{incomplete type 'B::X' named in nested name specifier}} template<> struct X { typedef int y; }; typename X::y c; template<> struct X {}; // expected-note {{previous definition is here}} template<> struct X {}; // expected-error {{redefinition of 'X'}} }; B b; // expected-note {{in instantiation of}}