[clang] [clang] Don't treat extraneous `template<>` tags as member specializations (PR #227358)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 09:46:41 PDT 2026
================
@@ -370,8 +370,6 @@ namespace cwg531 { // cwg531: partial
// expected-note@#cwg531-A-char {{'template<>' header not required for explicitly-specialized class 'cwg531::bad::A<char>' declared here}}
template<> struct A<char>::B {};
// expected-error at -1 {{extraneous 'template<>' in declaration of struct 'B'}}
- // expected-error at -2 {{specialization of member 'cwg531::bad::A<char>::B' does not specialize an instantiated member}}
- // expected-note@#cwg531-B {{attempt to specialize declaration here}}
----------------
Endilll wrote:
> In the standard's example A<char> isn't explicitly specialized
Thank you, this is what I've missed. Removing those diagnostics makes sense to me now.
https://github.com/llvm/llvm-project/pull/227358
More information about the cfe-commits
mailing list