Lines Matching refs:SemaRef

925 static TemplateArgumentLoc translateTemplateArgument(Sema &SemaRef,  in translateTemplateArgument()  argument
931 QualType T = SemaRef.GetTypeFromParser(Arg.getAsType(), &DI); in translateTemplateArgument()
933 DI = SemaRef.Context.getTrivialTypeSourceInfo(T, Arg.getLocation()); in translateTemplateArgument()
950 SemaRef.Context, TArg, in translateTemplateArgument()
951 Arg.getScopeSpec().getWithLocInContext(SemaRef.Context), in translateTemplateArgument()
968 static void maybeDiagnoseTemplateParameterShadow(Sema &SemaRef, Scope *S, in maybeDiagnoseTemplateParameterShadow() argument
971 NamedDecl *PrevDecl = SemaRef.LookupSingleName( in maybeDiagnoseTemplateParameterShadow()
974 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl); in maybeDiagnoseTemplateParameterShadow()
1740 ConstraintRefersToContainingTemplateChecker(Sema &SemaRef, in ConstraintRefersToContainingTemplateChecker() argument
1743 : inherited(SemaRef), Friend(Friend), TemplateDepth(TemplateDepth) {} in ConstraintRefersToContainingTemplateChecker()
2239 Sema &SemaRef, in ExtractTypeForDeductionGuide() argument
2241 : Base(SemaRef), MaterializedTypedefs(MaterializedTypedefs) {} in ExtractTypeForDeductionGuide()
2246 ASTContext &Context = SemaRef.getASTContext(); in TransformTypedefType()
2282 : SemaRef(S), Template(Template) { in ConvertConstructorToDeductionGuideTransform()
2294 OuterInstantiationArgs = SemaRef.getTemplateInstantiationArgs(Template); in ConvertConstructorToDeductionGuideTransform()
2297 Sema &SemaRef; member
2304 SemaRef.Context.DeclarationNames.getCXXDeductionGuideName(Template);
2306 QualType DeducedType = SemaRef.Context.getTypeDeclType(Primary);
2321 LocalInstantiationScope Scope(SemaRef); in transformConstructor()
2356 Depth1Args.push_back(SemaRef.Context.getCanonicalTemplateArgument( in transformConstructor()
2357 SemaRef.Context.getInjectedTemplateArg(NewParam))); in transformConstructor()
2360 TemplateDeclInstantiator Instantiator(SemaRef, DC, in transformConstructor()
2363 SemaRef.runWithSufficientStackSpace(NewParam->getLocation(), [&] { in transformConstructor()
2372 SubstArgs.push_back(SemaRef.Context.getCanonicalTemplateArgument( in transformConstructor()
2373 SemaRef.Context.getInjectedTemplateArg(NewParam))); in transformConstructor()
2385 ExprResult E = SemaRef.SubstExpr(InnerRC, Args); in transformConstructor()
2392 SemaRef.Context, InnerParams->getTemplateLoc(), in transformConstructor()
2421 TypeSourceInfo *NewTInfo = TLB.getTypeSourceInfo(SemaRef.Context, NewType); in transformConstructor()
2435 QualType Result = SemaRef.BuildFunctionType(DeducedType, ParamTypes, Loc, in buildSimpleDeductionGuide()
2437 TypeSourceInfo *TSI = SemaRef.Context.getTrivialTypeSourceInfo(Result, Loc); in buildSimpleDeductionGuide()
2439 TSI = SemaRef.SubstType(TSI, OuterInstantiationArgs, Loc, in buildSimpleDeductionGuide()
2448 auto *TSI = SemaRef.Context.getTrivialTypeSourceInfo(T, Loc); in buildSimpleDeductionGuide()
2450 TSI = SemaRef.SubstType(TSI, OuterInstantiationArgs, Loc, in buildSimpleDeductionGuide()
2453 ParmVarDecl::Create(SemaRef.Context, DC, Loc, Loc, nullptr, in buildSimpleDeductionGuide()
2474 SemaRef.Context, DC, TTP->getBeginLoc(), TTP->getLocation(), in transformTemplateParameter()
2482 SemaRef.SubstTypeConstraint(NewTTP, TC, Args, in transformTemplateParameter()
2486 SemaRef.SubstType(TTP->getDefaultArgumentInfo(), Args, in transformTemplateParameter()
2491 SemaRef.CurrentInstantiationScope->InstantiatedLocal(TemplateParam, in transformTemplateParameter()
2509 cast<TemplateParmDecl>(SemaRef.SubstDecl(OldParam, DC, Args)); in transformTemplateParameterImpl()
2571 QualType Result = SemaRef.BuildFunctionType( in transformFunctionProtoType()
2595 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, 0); in transformFunctionTypeParam()
2597 SemaRef.SubstType(PackTL.getPatternLoc(), Args, in transformFunctionTypeParam()
2601 SemaRef.CheckPackExpansion(NewDI, PackTL.getEllipsisLoc(), in transformFunctionTypeParam()
2604 NewDI = SemaRef.SubstType(OldDI, Args, OldParam->getLocation(), in transformFunctionTypeParam()
2613 NewDI = ExtractTypeForDeductionGuide(SemaRef, MaterializedTypedefs) in transformFunctionTypeParam()
2623 NewDefArg = new (SemaRef.Context) in transformFunctionTypeParam()
2625 ParamTy.getNonLValueExprType(SemaRef.Context), in transformFunctionTypeParam()
2633 NewType = SemaRef.Context.getDecayedType(NewType); in transformFunctionTypeParam()
2636 SemaRef.Context, DC, OldParam->getInnerLocStart(), in transformFunctionTypeParam()
2641 SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); in transformFunctionTypeParam()
2656 CXXDeductionGuideDecl::Create(SemaRef.Context, DC, LocStart, ES, Name,
2667 SemaRef.Context, DC, Loc, DeductionGuideName, TemplateParams, Guide);
3763 checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, in checkBuiltinTemplateIdType() argument
3767 ASTContext &Context = SemaRef.getASTContext(); in checkBuiltinTemplateIdType()
3778 SemaRef.Diag(TemplateArgs[1].getLocation(), in checkBuiltinTemplateIdType()
3793 SemaRef.Context.getTrivialTypeSourceInfo( in checkBuiltinTemplateIdType()
3801 SyntheticTemplateArgs.addArgument(SemaRef.getTrivialTemplateArgumentLoc( in checkBuiltinTemplateIdType()
3807 SemaRef.Diag(TemplateArgs[2].getLocation(), in checkBuiltinTemplateIdType()
3814 return SemaRef.CheckTemplateIdType(Converted[0].getAsTemplate(), in checkBuiltinTemplateIdType()
3835 SemaRef.Diag(TemplateArgs[0].getLocation(), in checkBuiltinTemplateIdType()
5454 Sema &SemaRef, TemplateDecl *Template, SourceLocation TemplateLoc, in SubstDefaultTemplateArgument() argument
5463 Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc, Param, Template, in SubstDefaultTemplateArgument()
5478 Sema::ContextRAII SavedContext(SemaRef, Template->getDeclContext(), in SubstDefaultTemplateArgument()
5481 SemaRef.SubstType(ArgType, TemplateArgLists, in SubstDefaultTemplateArgument()
5511 Sema &SemaRef, TemplateDecl *Template, SourceLocation TemplateLoc, in SubstDefaultTemplateArgument() argument
5515 Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc, Param, Template, in SubstDefaultTemplateArgument()
5527 Sema::ContextRAII SavedContext(SemaRef, Template->getDeclContext()); in SubstDefaultTemplateArgument()
5529 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated); in SubstDefaultTemplateArgument()
5530 return SemaRef.SubstExpr(Param->getDefaultArgument(), TemplateArgLists); in SubstDefaultTemplateArgument()
5559 Sema &SemaRef, TemplateDecl *Template, SourceLocation TemplateLoc, in SubstDefaultTemplateArgument() argument
5565 SemaRef, TemplateLoc, TemplateParameter(Param), Template, in SubstDefaultTemplateArgument()
5576 Sema::ContextRAII SavedContext(SemaRef, Template->getDeclContext()); in SubstDefaultTemplateArgument()
5581 SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc, TemplateArgLists); in SubstDefaultTemplateArgument()
5586 return SemaRef.SubstTemplateName( in SubstDefaultTemplateArgument()
11421 CurrentInstantiationRebuilder(Sema &SemaRef, in CurrentInstantiationRebuilder() argument
11424 : TreeTransform<CurrentInstantiationRebuilder>(SemaRef), in CurrentInstantiationRebuilder()