[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 31 02:07:30 PDT 2024


================
@@ -33,11 +33,12 @@ class D{}; // expected-note{{previous definition is here}}
 template<typename T>
 class D<T>{}; // expected-error{{class template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list}} expected-error{{redefinition of 'D'}}
 
-template<typename T> requires C1<T> // expected-note{{previous template declaration is here}}
-class E{};
+template<typename T> requires C1<T>
+class E{}; // expected-note{{previous definition is here}}
 
-template<typename T> // expected-error{{requires clause differs in template redeclaration}}
+template<typename T>
----------------
zyn0217 wrote:

Hmm, it looks like only we would diagnose an additional `requires clause differs` error.

https://gcc.godbolt.org/z/6doaeMEr3

https://github.com/llvm/llvm-project/pull/106585


More information about the cfe-commits mailing list