[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 8 06:40:33 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();
----------------
AaronBallman wrote:
In the absence of a concrete reason to do this, I'd say it's fine to remove the `setInvalidDecl()` entirely as you did originally. Sorry for the noise!
https://github.com/llvm/llvm-project/pull/147275
More information about the cfe-commits
mailing list