[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 09:51:22 PDT 2025
================
@@ -4111,7 +4111,10 @@ static ActionResult<CXXRecordDecl *> getPatternForClassTemplateSpecialization(
if (Ambiguous) {
// Partial ordering did not produce a clear winner. Complain.
Inst.Clear();
- ClassTemplateSpec->setInvalidDecl();
+
+ if (!S.isSFINAEContext())
+ ClassTemplateSpec->setInvalidDecl();
----------------
mizvekov wrote:
Are we still getting any benefit from marking this declaration as invalid in the remaining case?
https://github.com/llvm/llvm-project/pull/147275
More information about the cfe-commits
mailing list