// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s namespace nodiag { template requires (bool(T())) struct A; template requires (bool(U())) struct A; template concept C1 = true; template requires (bool(T())) struct B; template requires (bool(U())) struct B; } // end namespace nodiag namespace diag { template requires true // expected-note{{previous template declaration is here}} struct A; template struct A; // expected-error{{requires clause differs in template redeclaration}} template struct B; // expected-note{{previous template declaration is here}} template requires true // expected-error{{requires clause differs in template redeclaration}} struct B; template requires true // expected-note{{previous template declaration is here}} struct C; template requires (!0) // expected-error{{requires clause differs in template redeclaration}} struct C; template concept C1 = true; template // expected-note{{previous template declaration is here}} struct D; template requires C1 // expected-error{{type constraint differs in template redeclaration}} struct D; } // end namespace diag namespace nodiag { struct AA { template requires (someFunc(T())) struct A; }; template requires (someFunc(U())) struct AA::A { }; struct AAF { template requires (someFunc(T())) friend struct AA::A; }; } // end namespace nodiag namespace diag { template struct TA { template