[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:00:37 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:

Although we error on the specialization of `E<T>`,  I still feel like the loss of the error `requires clause differs` is not so clear as the previous. @cor3ntin WDYT?

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


More information about the cfe-commits mailing list