================
@@ -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();
----------------
Z3rox-dev wrote:

I saw that the partial specialization was ill-formed and I added 
setInvalidDecl() to stop deduction and avoid the crash. I see now this was 
wrong in this case, because Clang allows it as a valid extension, right?

https://github.com/llvm/llvm-project/pull/181561
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to