[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 27 09:57:15 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;
----------------
mizvekov wrote:
Is this check really necessary? Since you already performed a cast above, this can't be null.
Can you add a test case for this?
https://github.com/llvm/llvm-project/pull/98788
More information about the cfe-commits
mailing list