[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 05:41:53 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>
----------------
sdkrystian wrote:
I can move the point at which we emit the redefinition error to be after the check for equivalent _template-heads_, if you'd like. Then we would get the "requires clause differs in template redeclaration" error instead.
https://github.com/llvm/llvm-project/pull/106585
More information about the cfe-commits
mailing list