================ @@ -2612,44 +2669,312 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams, CXXConstructorDecl *Ctor, - ExplicitSpecifier ES, TypeSourceInfo *TInfo, SourceLocation LocStart, - SourceLocation Loc, SourceLocation LocEnd, - llvm::ArrayRef<TypedefNameDecl *> MaterializedTypedefs = {}) { - DeclarationNameInfo Name(DeductionGuideName, Loc); - ArrayRef<ParmVarDecl *> Params = - TInfo->getTypeLoc().castAs<FunctionProtoTypeLoc>().getParams(); +// Find all template parameters that appear in the given DeducedArgs. +// Return the indices of the template parameters in the TemplateParams. +SmallVector<unsigned> TemplateParamsReferencedInTemplateArgumentList( + ArrayRef<NamedDecl *> TemplateParams, + ArrayRef<TemplateArgument> DeducedArgs) { + struct FindAppearedTemplateParams ---------------- erichkeane wrote:
> I missed this one when renaming the function. What do you think about the > current one `ReferenceFinder`? ReferenceFinder is a little overloaded of a name :) Perhaps `TypeReferencedFinder`? Note the 'd' which I think prevents it from being mistaken with a "finds all things with an L or R value reference". https://github.com/llvm/llvm-project/pull/77890 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits