// RUN: %clang_cc1 -fsyntax-only -verify %s template struct Def1; template<> struct Def1 { void foo(); }; template<> struct Def1 { // expected-note{{previous definition is here}} void bar(); }; template<> struct Def1 { void wibble(); }; void test_Def1(Def1 *d1, Def1 *d2, Def1 *d3) { d1->foo(); d2->bar(); d3->wibble(); } template // expected-error{{'T2' declared as a pointer to a reference}} struct Def2; template<> struct Def2 { void foo(); }; void test_Def2(Def2 *d2) { d2->foo(); } typedef int& int_ref_t; Def2 *d2; // expected-note{{in instantiation of default argument for 'Def2' required here}} template<> struct Def1 { }; // expected-error{{redefinition of 'Def1'}} template struct Def3; template<> struct Def3 { void foo(); }; template<> struct Def3 { void bar(); }; void test_Def3(Def3 *d3a, Def3 *d3b) { d3a->foo(); d3b->bar(); } template struct Def4; template<> struct Def4 { void foo(); }; void test_Def4(Def4 *d4a) { d4a->foo(); } template struct Def5; template<> struct Def5 { void foo(); }; template<> struct Def5 { void bar(); }; void test_Def5(Def5 *d5a, Def5 *d5b) { d5a->foo(); d5b->bar(); } template struct Def6; template<> struct Def6 { void foo(); }; template<> struct Def6 { void bar(); }; bool test_Def6(Def6 *d6a, Def6 *d6b, Def6 *d6c) { d6a->foo(); d6b->foo(); d6c->bar(); return d6a == d6b; }