[clang] [clang] CTAD alias: Respecte explicit deduction guides defined after the first use of the alias template. (PR #125478)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 04:00:13 PST 2025
================
@@ -1191,13 +1209,10 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
if (AliasTemplate->isInvalidDecl())
return;
auto &Context = SemaRef.Context;
- // FIXME: if there is an explicit deduction guide after the first use of the
- // type alias usage, we will not cover this explicit deduction guide. fix this
- // case.
- if (hasDeclaredDeductionGuides(
- Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate),
- AliasTemplate->getDeclContext()))
- return;
+ auto SourceDeductionGuides = getSourceDeductionGuides(
+ Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate),
+ AliasTemplate->getDeclContext());
+
----------------
cor3ntin wrote:
Would it be worth it to create the map only if it's needed?
https://github.com/llvm/llvm-project/pull/125478
More information about the cfe-commits
mailing list