[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 02:59:03 PDT 2024


https://github.com/cor3ntin commented:

I like the general idea 


- I would prefer this to be called `no_specializations` or `disallow_specializations`
- I would like to see more tests to what it can mor cannot be applied to (for example an explicit specialization, a variable template, an alias)
- In the same vein, can this be applied to a partial specialization to prevent subsequent specializations?
- I think the diagnostic should say `note: marked `[[clang::no_specialization]] here`


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


More information about the cfe-commits mailing list