// RUN: %clang_cc1 -fms-extensions -fdelayed-template-parsing -fsyntax-only -verify %s template class A { void foo() { undeclared(); } void foo2(); }; template class B { void foo4() { } // expected-note {{previous definition is here}} expected-note {{previous definition is here}} void foo4() { } // expected-error {{class member cannot be redeclared}} expected-error {{redefinition of 'foo4'}} expected-note {{previous definition is here}} friend void foo3() { undeclared(); } }; template void B::foo4() {// expected-error {{redefinition of 'foo4'}} } template void A::foo2() { undeclared(); } template void foo3() { undeclared(); } template void A::foo2(); void undeclared() { } template void foo5() {} //expected-note {{previous definition is here}} template void foo5() {} // expected-error {{redefinition of 'foo5'}} namespace Inner_Outer_same_template_param_name { template class Outmost { public: template class Inner { public: void f() { T* var; } }; }; }