Lines Matching refs:SemaRef

70       Sema &SemaRef,  in ExtractTypeForDeductionGuide()  argument
74 : Base(SemaRef), MaterializedTypedefs(MaterializedTypedefs), in ExtractTypeForDeductionGuide()
79 SemaRef, SemaRef.getASTContext().getTranslationUnitDecl(), in ExtractTypeForDeductionGuide()
139 ASTContext &Context = SemaRef.getASTContext(); in TransformTypedefType()
198 Sema &SemaRef, TemplateDecl *OriginalTemplate, in buildDeductionGuide() argument
205 SemaRef.Context.DeclarationNames.getCXXDeductionGuideName(
214 CXXDeductionGuideDecl::Create(SemaRef.Context, DC, LocStart, ES, Name,
232 SemaRef.Context, DC, Loc, DeductionGuideName, TemplateParams, Guide);
245 transformTemplateTypeParam(Sema &SemaRef, DeclContext *DC, in transformTemplateTypeParam() argument
252 SemaRef.Context, DC, TTP->getBeginLoc(), TTP->getLocation(), NewDepth, in transformTemplateTypeParam()
259 SemaRef.SubstTypeConstraint(NewTTP, TC, Args, in transformTemplateTypeParam()
263 if (!SemaRef.SubstTemplateArgument( in transformTemplateTypeParam()
266 NewTTP->setDefaultArgument(SemaRef.Context, InstantiatedDefaultArg); in transformTemplateTypeParam()
268 SemaRef.CurrentInstantiationScope->InstantiatedLocal(TTP, NewTTP); in transformTemplateTypeParam()
274 transformTemplateParam(Sema &SemaRef, DeclContext *DC, in transformTemplateParam() argument
281 SemaRef.SubstDecl(OldParam, DC, Args)); in transformTemplateParam()
292 : SemaRef(S), Template(Template) { in ConvertConstructorToDeductionGuideTransform()
304 OuterInstantiationArgs = SemaRef.getTemplateInstantiationArgs(Template); in ConvertConstructorToDeductionGuideTransform()
307 Sema &SemaRef; member
314 SemaRef.Context.DeclarationNames.getCXXDeductionGuideName(Template);
316 QualType DeducedType = SemaRef.Context.getTypeDeclType(Primary);
331 LocalInstantiationScope Scope(SemaRef); in transformConstructor()
341 SemaRef.GetTemplateParameterList(Template); in transformConstructor()
366 Depth1Args.push_back(SemaRef.Context.getInjectedTemplateArg(NewParam)); in transformConstructor()
369 TemplateDeclInstantiator Instantiator(SemaRef, DC, in transformConstructor()
372 SemaRef.runWithSufficientStackSpace(NewParam->getLocation(), [&] { in transformConstructor()
381 SubstArgs.push_back(SemaRef.Context.getInjectedTemplateArg(NewParam)); in transformConstructor()
393 ExprResult E = SemaRef.SubstExpr(InnerRC, Args); in transformConstructor()
400 SemaRef.Context, InnerParams->getTemplateLoc(), in transformConstructor()
430 TypeSourceInfo *NewTInfo = TLB.getTypeSourceInfo(SemaRef.Context, NewType); in transformConstructor()
433 SemaRef, Template, TemplateParams, CD, CD->getExplicitSpecifier(), in transformConstructor()
445 QualType Result = SemaRef.BuildFunctionType(DeducedType, ParamTypes, Loc, in buildSimpleDeductionGuide()
447 TypeSourceInfo *TSI = SemaRef.Context.getTrivialTypeSourceInfo(Result, Loc); in buildSimpleDeductionGuide()
449 TSI = SemaRef.SubstType(TSI, OuterInstantiationArgs, Loc, in buildSimpleDeductionGuide()
461 auto *TSI = SemaRef.Context.getTrivialTypeSourceInfo(T, Loc); in buildSimpleDeductionGuide()
463 TSI = SemaRef.SubstType(TSI, OuterInstantiationArgs, Loc, in buildSimpleDeductionGuide()
469 ParmVarDecl::Create(SemaRef.Context, DC, Loc, Loc, nullptr, in buildSimpleDeductionGuide()
477 SemaRef, Template, SemaRef.GetTemplateParameterList(Template), nullptr, in buildSimpleDeductionGuide()
489 SemaRef, DC, TTP, Args, TTP->getDepth() - 1, in transformTemplateParameter()
492 return transformTemplateParam(SemaRef, DC, TTP, Args, in transformTemplateParameter()
496 return transformTemplateParam(SemaRef, DC, NTTP, Args, in transformTemplateParameter()
558 QualType Result = SemaRef.BuildFunctionType( in transformFunctionProtoType()
583 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, 0); in transformFunctionTypeParam()
585 SemaRef.SubstType(PackTL.getPatternLoc(), Args, in transformFunctionTypeParam()
590 SemaRef.CheckPackExpansion(NewDI, PackTL.getEllipsisLoc(), in transformFunctionTypeParam()
593 NewDI = SemaRef.SubstType(OldDI, Args, OldParam->getLocation(), in transformFunctionTypeParam()
603 SemaRef, MaterializedTypedefs, NestedPattern, in transformFunctionTypeParam()
614 NewDefArg = new (SemaRef.Context) in transformFunctionTypeParam()
616 ParamTy.getNonLValueExprType(SemaRef.Context), in transformFunctionTypeParam()
624 NewType = SemaRef.Context.getDecayedType(NewType); in transformFunctionTypeParam()
627 SemaRef.Context, DC, OldParam->getInnerLocStart(), in transformFunctionTypeParam()
632 SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); in transformFunctionTypeParam()
725 NamedDecl *transformTemplateParameter(Sema &SemaRef, DeclContext *DC, in transformTemplateParameter() argument
730 return transformTemplateTypeParam(SemaRef, DC, TTP, Args, NewDepth, in transformTemplateParameter()
733 return transformTemplateParam(SemaRef, DC, TTP, Args, NewIndex, NewDepth); in transformTemplateParameter()
735 return transformTemplateParam(SemaRef, DC, NTTP, Args, NewIndex, NewDepth); in transformTemplateParameter()
748 buildAssociatedConstraints(Sema &SemaRef, FunctionTemplateDecl *F, in buildAssociatedConstraints() argument
756 ASTContext &Context = SemaRef.Context; in buildAssociatedConstraints()
757 LocalInstantiationScope Scope(SemaRef); in buildAssociatedConstraints()
792 SemaRef, AliasTemplate->getDeclContext(), TP, Args, in buildAssociatedConstraints()
818 SemaRef, F->getDeclContext(), TP, Args, in buildAssociatedConstraints()
828 SemaRef.getTrivialTemplateArgumentLoc(D, QualType(), SourceLocation{}); in buildAssociatedConstraints()
830 if (!SemaRef.SubstTemplateArgument(Input, Args, Output)) { in buildAssociatedConstraints()
874 auto OuterLevelArgs = SemaRef.getTemplateInstantiationArgs( in buildAssociatedConstraints()
884 ExprResult E = SemaRef.SubstExpr(RC, ArgsForBuildingRC); in buildAssociatedConstraints()
889 SemaRef.BuildBinOp(SemaRef.getCurScope(), SourceLocation{}, in buildAssociatedConstraints()
899 Expr *buildIsDeducibleConstraint(Sema &SemaRef, in buildIsDeducibleConstraint() argument
903 ASTContext &Context = SemaRef.Context; in buildIsDeducibleConstraint()
908 LocalInstantiationScope Scope(SemaRef); in buildIsDeducibleConstraint()
920 SemaRef, AliasTemplate->getDeclContext(), TP, Args, in buildIsDeducibleConstraint()
932 ReturnType = SemaRef.SubstType( in buildIsDeducibleConstraint()
953 getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { in getRHSTemplateDeclAndArgs() argument
957 .getSingleStepDesugaredType(SemaRef.Context); in getRHSTemplateDeclAndArgs()
984 BuildDeductionGuideForTypeAlias(Sema &SemaRef, in BuildDeductionGuideForTypeAlias() argument
987 LocalInstantiationScope Scope(SemaRef); in BuildDeductionGuideForTypeAlias()
989 SemaRef, AliasTemplate->getLocation(), F, in BuildDeductionGuideForTypeAlias()
994 auto &Context = SemaRef.Context; in BuildDeductionGuideForTypeAlias()
996 getRHSTemplateDeclAndArgs(SemaRef, AliasTemplate); in BuildDeductionGuideForTypeAlias()
1039 SemaRef.DeduceTemplateArguments( in BuildDeductionGuideForTypeAlias()
1083 SemaRef, AliasTemplate->getDeclContext(), TP, Args, in BuildDeductionGuideForTypeAlias()
1103 SemaRef, F->getDeclContext(), TP, Args, FPrimeTemplateParams.size(), in BuildDeductionGuideForTypeAlias()
1141 SemaRef.getTrivialTemplateArgumentLoc(D, QualType(), SourceLocation{}); in BuildDeductionGuideForTypeAlias()
1143 if (!SemaRef.SubstTemplateArgument(Input, Args, Output)) { in BuildDeductionGuideForTypeAlias()
1153 if (auto *FPrime = SemaRef.InstantiateFunctionDeclaration( in BuildDeductionGuideForTypeAlias()
1159 SemaRef, AliasTemplate, FPrime->getReturnType(), FPrimeTemplateParams); in BuildDeductionGuideForTypeAlias()
1161 buildAssociatedConstraints(SemaRef, F, AliasTemplate, DeduceResults, in BuildDeductionGuideForTypeAlias()
1171 SemaRef, AliasTemplate, FPrimeTemplateParamList, in BuildDeductionGuideForTypeAlias()
1184 Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate, SourceLocation Loc) { in DeclareImplicitDeductionGuidesForTypeAlias() argument
1187 auto &Context = SemaRef.Context; in DeclareImplicitDeductionGuidesForTypeAlias()
1196 getRHSTemplateDeclAndArgs(SemaRef, AliasTemplate); in DeclareImplicitDeductionGuidesForTypeAlias()
1201 LookupResult Guides(SemaRef, NameInfo, clang::Sema::LookupOrdinaryName); in DeclareImplicitDeductionGuidesForTypeAlias()
1202 SemaRef.LookupQualifiedName(Guides, Template->getDeclContext()); in DeclareImplicitDeductionGuidesForTypeAlias()
1209 SemaRef.Context.getTrivialTypeSourceInfo(DG->getType()); in DeclareImplicitDeductionGuidesForTypeAlias()
1216 auto *TSI = SemaRef.Context.getTrivialTypeSourceInfo(P->getType()); in DeclareImplicitDeductionGuidesForTypeAlias()
1218 SemaRef.Context, G->getDeclContext(), in DeclareImplicitDeductionGuidesForTypeAlias()
1225 SemaRef, AliasTemplate, /*TemplateParams=*/nullptr, in DeclareImplicitDeductionGuidesForTypeAlias()
1234 SemaRef, AliasTemplate, Transformed->getReturnType(), {}); in DeclareImplicitDeductionGuidesForTypeAlias()
1237 SemaRef.BuildBinOp(SemaRef.getCurScope(), SourceLocation{}, in DeclareImplicitDeductionGuidesForTypeAlias()
1254 BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); in DeclareImplicitDeductionGuidesForTypeAlias()
1260 Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate, in DeclareAggregateDeductionGuideForTypeAlias() argument
1263 getRHSTemplateDeclAndArgs(SemaRef, AliasTemplate).first; in DeclareAggregateDeductionGuideForTypeAlias()
1269 ExtractTypeForDeductionGuide TypeAliasTransformer(SemaRef, TypedefDecls); in DeclareAggregateDeductionGuideForTypeAlias()
1277 auto *RHSDeductionGuide = SemaRef.DeclareAggregateDeductionGuideFromInitList( in DeclareAggregateDeductionGuideForTypeAlias()
1285 return BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, in DeclareAggregateDeductionGuideForTypeAlias()