[clang] [Clang][Sema] Mark partial specializations invalid when not more specialized than primary (PR #181561)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 22 18:49:50 PST 2026
================
@@ -4229,6 +4229,9 @@ static void checkMoreSpecializedThanPrimary(Sema &S, PartialSpecDecl *Partial) {
diag::ext_partial_spec_not_more_specialized_than_primary)
<< isa<VarTemplateDecl>(Template);
+ // An invalid partial specialization should not be deduced.
+ Partial->setInvalidDecl();
----------------
ojhunt wrote:
Why is this being marked as invalid?
https://github.com/llvm/llvm-project/pull/181561
More information about the cfe-commits
mailing list