[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
================
@@ -2211,17 +2211,20 @@ CXXDeductionGuideDecl *CXXDeductionGuideDecl::Create(
ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
ExplicitSpecifier ES, const DeclarationNameInfo &NameInfo, QualType T,
TypeSourceInfo *TInfo, SourceLocation EndLocation, CXXConstructorDecl *Ctor,
- DeductionCandidate Kind) {
- return new (C, DC) CXXDeductionGuideDecl(C, DC, StartLoc, ES, NameInfo, T,
- TInfo, EndLocation, Ctor, Kind);
+ DeductionCandidate Kind, CXXDeductionGuideDecl *GeneratedFrom,
+ SourceKind SK) {
+ return new (C, DC)
+ CXXDeductionGuideDecl(C, DC, StartLoc, ES, NameInfo, T, TInfo,
+ EndLocation, Ctor, Kind, GeneratedFrom, SK);
}
CXXDeductionGuideDecl *
CXXDeductionGuideDecl::CreateDeserialized(ASTContext &C, GlobalDeclID ID) {
return new (C, ID) CXXDeductionGuideDecl(
C, nullptr, SourceLocation(), ExplicitSpecifier(), DeclarationNameInfo(),
QualType(), nullptr, SourceLocation(), nullptr,
- DeductionCandidate::Normal);
+ DeductionCandidate::Normal, /*GeneratedFrom=*/nullptr,
+ /*SK=*/SourceKind::Alias);
----------------
mizvekov wrote:
Nit: The comment is not really necessary since the spelling of the argument gives enough context.
```suggestion
SourceKind::Alias);
```
https://github.com/llvm/llvm-project/pull/98788
More information about the cfe-commits
mailing list