[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 21 00:36:39 PDT 2024
================
@@ -1186,17 +1281,34 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
NewParam->setScopeInfo(0, I);
FPTL.setParam(I, NewParam);
}
- auto *Transformed = cast<FunctionDecl>(buildDeductionGuide(
- SemaRef, AliasTemplate, /*TemplateParams=*/nullptr,
+
+ QualType ReturnType =
+ cast<FunctionProtoType>(FunctionType->getType())->getReturnType();
+ if (!FunctionType)
+ continue;
----------------
antangelo wrote:
Thanks for catching this! It's not necessary, I believe it's an erroneous leftover from a prior refactor. In the current code path that function type is always defined. I've removed the check accordingly.
https://github.com/llvm/llvm-project/pull/98788
More information about the cfe-commits
mailing list