// RUN: %clang_cc1 -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}} }; 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'}}