Lines Matching refs:SemaRef
40 static bool SubstQualifier(Sema &SemaRef, const DeclT *OldDecl, DeclT *NewDecl, in SubstQualifier() argument
49 SemaRef, in SubstQualifier()
55 = SemaRef.SubstNestedNameSpecifierLoc(OldDecl->getQualifierLoc(), in SubstQualifier()
67 return ::SubstQualifier(SemaRef, OldDecl, NewDecl, TemplateArgs); in SubstQualifier()
72 return ::SubstQualifier(SemaRef, OldDecl, NewDecl, TemplateArgs); in SubstQualifier()
444 LabelDecl *Inst = LabelDecl::Create(SemaRef.Context, Owner, D->getLocation(), in VisitLabelDecl()
458 = NamespaceAliasDecl::Create(SemaRef.Context, Owner, in VisitNamespaceAliasDecl()
475 DI = SemaRef.SubstType(DI, TemplateArgs, in InstantiateTypedefNameDecl()
479 DI = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.Context.IntTy); in InstantiateTypedefNameDecl()
482 SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType()); in InstantiateTypedefNameDecl()
493 RD->getEnclosingNamespaceContext() == SemaRef.getStdNamespace() && in InstantiateTypedefNameDecl()
496 SemaRef.getSourceManager().isInSystemHeader(D->getLocStart())) in InstantiateTypedefNameDecl()
498 DI = SemaRef.Context.getTrivialTypeSourceInfo( in InstantiateTypedefNameDecl()
504 Typedef = TypeAliasDecl::Create(SemaRef.Context, Owner, D->getLocStart(), in InstantiateTypedefNameDecl()
507 Typedef = TypedefDecl::Create(SemaRef.Context, Owner, D->getLocStart(), in InstantiateTypedefNameDecl()
524 NamedDecl *InstPrev = SemaRef.FindInstantiatedDecl(D->getLocation(), Prev, in InstantiateTypedefNameDecl()
532 SemaRef.isIncompatibleTypedef(InstPrevTypedef, Typedef); in InstantiateTypedefNameDecl()
537 SemaRef.InstantiateAttrs(TemplateArgs, D, Typedef); in InstantiateTypedefNameDecl()
562 LocalInstantiationScope Scope(SemaRef); in VisitTypeAliasTemplateDecl()
585 = TypeAliasTemplateDecl::Create(SemaRef.Context, Owner, D->getLocation(), in VisitTypeAliasTemplateDecl()
609 TypeSourceInfo *DI = SemaRef.SubstType(D->getTypeSourceInfo(), in VisitVarDecl()
617 SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function) in VisitVarDecl()
624 SemaRef.adjustContextForLocalExternDecl(DC); in VisitVarDecl()
627 VarDecl *Var = VarDecl::Create(SemaRef.Context, DC, D->getInnerLocStart(), in VisitVarDecl()
632 if (SemaRef.getLangOpts().ObjCAutoRefCount && in VisitVarDecl()
633 SemaRef.inferObjCARCLifetime(Var)) in VisitVarDecl()
640 SemaRef.BuildVariableInstantiation(Var, D, TemplateArgs, LateAttrs, Owner, in VisitVarDecl()
645 if (SemaRef.isCopyElisionCandidate(ReturnType, Var, false)) in VisitVarDecl()
656 = AccessSpecDecl::Create(SemaRef.Context, D->getAccess(), Owner, in VisitAccessSpecDecl()
667 DI = SemaRef.SubstType(DI, TemplateArgs, in VisitFieldDecl()
679 SemaRef.Diag(D->getLocation(), diag::err_field_instantiates_to_function) in VisitFieldDecl()
684 SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType()); in VisitFieldDecl()
692 EnterExpressionEvaluationContext Unevaluated(SemaRef, in VisitFieldDecl()
696 = SemaRef.SubstExpr(BitWidth, TemplateArgs); in VisitFieldDecl()
704 FieldDecl *Field = SemaRef.CheckFieldDecl(D->getDeclName(), in VisitFieldDecl()
719 SemaRef.InstantiateAttrs(TemplateArgs, D, Field, LateAttrs, StartingScope); in VisitFieldDecl()
722 SemaRef.CheckAlignasUnderalignment(Field); in VisitFieldDecl()
729 SemaRef.Context.setInstantiatedFromUnnamedFieldDecl(Field, D); in VisitFieldDecl()
734 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Field); in VisitFieldDecl()
749 SemaRef.Diag(D->getLocation(), diag::err_property_is_variably_modified) in VisitMSPropertyDecl()
753 DI = SemaRef.SubstType(DI, TemplateArgs, in VisitMSPropertyDecl()
765 SemaRef.Diag(D->getLocation(), diag::err_field_instantiates_to_function) in VisitMSPropertyDecl()
770 SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType()); in VisitMSPropertyDecl()
774 SemaRef.Context, Owner, D->getLocation(), D->getDeclName(), DI->getType(), in VisitMSPropertyDecl()
777 SemaRef.InstantiateAttrs(TemplateArgs, D, Property, LateAttrs, in VisitMSPropertyDecl()
791 new (SemaRef.Context)NamedDecl*[D->getChainingSize()]; in VisitIndirectFieldDecl()
795 NamedDecl *Next = SemaRef.FindInstantiatedDecl(D->getLocation(), PI, in VisitIndirectFieldDecl()
805 SemaRef.Context, Owner, D->getLocation(), D->getIdentifier(), T, in VisitIndirectFieldDecl()
809 IndirectField->addAttr(Attr->clone(SemaRef.Context)); in VisitIndirectFieldDecl()
829 InstTy = SemaRef.SubstType(Ty, TemplateArgs, in VisitFriendDecl()
835 FriendDecl *FD = SemaRef.CheckFriendTypeDecl(D->getLocStart(), in VisitFriendDecl()
857 FriendDecl::Create(SemaRef.Context, Owner, D->getLocation(), in VisitFriendDecl()
869 EnterExpressionEvaluationContext Unevaluated(SemaRef, in VisitStaticAssertDecl()
873 = SemaRef.SubstExpr(AssertExpr, TemplateArgs); in VisitStaticAssertDecl()
877 return SemaRef.BuildStaticAssertDeclaration(D->getLocation(), in VisitStaticAssertDecl()
887 NamedDecl *Prev = SemaRef.FindInstantiatedDecl(D->getLocation(), in VisitEnumDecl()
894 EnumDecl *Enum = EnumDecl::Create(SemaRef.Context, Owner, D->getLocStart(), in VisitEnumDecl()
904 TypeSourceInfo *NewTI = SemaRef.SubstType(TI, TemplateArgs, UnderlyingLoc, in VisitEnumDecl()
906 if (!NewTI || SemaRef.CheckEnumUnderlyingType(NewTI)) in VisitEnumDecl()
907 Enum->setIntegerType(SemaRef.Context.IntTy); in VisitEnumDecl()
917 SemaRef.InstantiateAttrs(TemplateArgs, D, Enum); in VisitEnumDecl()
922 SemaRef.Context.setManglingNumber(Enum, SemaRef.Context.getManglingNumber(D)); in VisitEnumDecl()
925 if (DeclaratorDecl *DD = SemaRef.Context.getDeclaratorForUnnamedTagDecl(D)) in VisitEnumDecl()
926 SemaRef.Context.addDeclaratorForUnnamedTagDecl(Enum, DD); in VisitEnumDecl()
929 if (TypedefNameDecl *TND = SemaRef.Context.getTypedefNameForUnnamedTagDecl(D)) in VisitEnumDecl()
930 SemaRef.Context.addTypedefNameForUnnamedTagDecl(Enum, TND); in VisitEnumDecl()
942 SemaRef.SubstType(TI->getType(), TemplateArgs, in VisitEnumDecl()
944 SemaRef.CheckEnumRedeclaration(Def->getLocation(), Def->isScoped(), in VisitEnumDecl()
958 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Enum); in VisitEnumDecl()
980 EnterExpressionEvaluationContext Unevaluated(SemaRef, in InstantiateEnumDefinition()
983 Value = SemaRef.SubstExpr(UninstValue, TemplateArgs); in InstantiateEnumDefinition()
994 = SemaRef.CheckEnumConstant(Enum, LastEnumConst, in InstantiateEnumDefinition()
1005 SemaRef.InstantiateAttrs(TemplateArgs, EC, EnumConst); in InstantiateEnumDefinition()
1016 SemaRef.CurrentInstantiationScope->InstantiatedLocal(EC, EnumConst); in InstantiateEnumDefinition()
1022 SemaRef.ActOnEnumBody(Enum->getLocation(), SourceLocation(), in InstantiateEnumDefinition()
1042 LocalInstantiationScope Scope(SemaRef); in VisitClassTemplateDecl()
1055 QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc, in VisitClassTemplateDecl()
1082 DC = SemaRef.computeDeclContext(SS); in VisitClassTemplateDecl()
1085 DC = SemaRef.FindInstantiatedContext(Pattern->getLocation(), in VisitClassTemplateDecl()
1092 LookupResult R(SemaRef, Pattern->getDeclName(), Pattern->getLocation(), in VisitClassTemplateDecl()
1094 SemaRef.LookupQualifiedName(R, DC); in VisitClassTemplateDecl()
1103 SemaRef.Diag(Pattern->getLocation(), diag::err_not_tag_in_scope) in VisitClassTemplateDecl()
1137 if (!SemaRef.TemplateParameterListsAreEqual(InstParams, PrevParams, in VisitClassTemplateDecl()
1150 SemaRef.CheckTemplateParameterList(InstParams, PrevParams, in VisitClassTemplateDecl()
1157 = CXXRecordDecl::Create(SemaRef.Context, Pattern->getTagKind(), DC, in VisitClassTemplateDecl()
1166 = ClassTemplateDecl::Create(SemaRef.Context, DC, D->getLocation(), in VisitClassTemplateDecl()
1187 SemaRef.Context.getInjectedClassNameType(RecordInst, in VisitClassTemplateDecl()
1249 LocalInstantiationScope Scope(SemaRef); in VisitVarTemplateDecl()
1272 SemaRef.Context, DC, D->getLocation(), D->getIdentifier(), InstParams, in VisitVarTemplateDecl()
1330 LocalInstantiationScope Scope(SemaRef); in VisitFunctionTemplateDecl()
1370 SemaRef.CheckFriendAccess(InstTemplate); in VisitFunctionTemplateDecl()
1381 NamedDecl *Prev = SemaRef.FindInstantiatedDecl(D->getLocation(), in VisitCXXRecordDecl()
1389 = CXXRecordDecl::Create(SemaRef.Context, D->getTagKind(), Owner, in VisitCXXRecordDecl()
1416 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Record); in VisitCXXRecordDecl()
1419 SemaRef.Context.setManglingNumber(Record, in VisitCXXRecordDecl()
1420 SemaRef.Context.getManglingNumber(D)); in VisitCXXRecordDecl()
1424 if (DeclaratorDecl *DD = SemaRef.Context.getDeclaratorForUnnamedTagDecl(D)) in VisitCXXRecordDecl()
1425 SemaRef.Context.addDeclaratorForUnnamedTagDecl(Record, DD); in VisitCXXRecordDecl()
1429 if (TypedefNameDecl *TND = SemaRef.Context.getTypedefNameForUnnamedTagDecl(D)) in VisitCXXRecordDecl()
1430 SemaRef.Context.addTypedefNameForUnnamedTagDecl(Record, TND); in VisitCXXRecordDecl()
1438 SavedPendingLocalImplicitInstantiations(SemaRef); in VisitCXXRecordDecl()
1440 SemaRef.InstantiateClass(D->getLocation(), Record, D, TemplateArgs, in VisitCXXRecordDecl()
1444 SemaRef.InstantiateClassMembers(D->getLocation(), Record, TemplateArgs, in VisitCXXRecordDecl()
1449 SemaRef.PerformPendingInstantiations(/*LocalOnly=*/true); in VisitCXXRecordDecl()
1452 SemaRef.DiagnoseUnusedNestedTypedefs(Record); in VisitCXXRecordDecl()
1510 LocalInstantiationScope Scope(SemaRef, MergeWithParentScope); in VisitFunctionDecl()
1516 QualType T = adjustFunctionTypeForInstantiation(SemaRef.Context, D, TInfo); in VisitFunctionDecl()
1520 QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc, in VisitFunctionDecl()
1532 SemaRef.adjustContextForLocalExternDecl(DC); in VisitFunctionDecl()
1536 DC = SemaRef.computeDeclContext(SS); in VisitFunctionDecl()
1539 DC = SemaRef.FindInstantiatedContext(D->getLocation(), D->getDeclContext(), in VisitFunctionDecl()
1544 FunctionDecl::Create(SemaRef.Context, DC, D->getInnerLocStart(), in VisitFunctionDecl()
1590 FunctionTemplate = FunctionTemplateDecl::Create(SemaRef.Context, DC, in VisitFunctionDecl()
1608 TemplateArgumentList::CreateCopy(SemaRef.Context, in VisitFunctionDecl()
1627 SemaRef, Function->getDeclName(), SourceLocation(), in VisitFunctionDecl()
1642 if (SemaRef.Subst(Info->getTemplateArgs(), Info->getNumTemplateArgs(), in VisitFunctionDecl()
1648 Decl *Temp = SemaRef.FindInstantiatedDecl(D->getLocation(), in VisitFunctionDecl()
1656 if (SemaRef.CheckFunctionTemplateSpecialization(Function, in VisitFunctionDecl()
1667 SemaRef.LookupQualifiedName(Previous, DC); in VisitFunctionDecl()
1677 SemaRef.CheckFunctionDeclaration(/*Scope*/ nullptr, Function, Previous, in VisitFunctionDecl()
1703 SemaRef.Diag(Function->getLocation(), diag::err_redefinition) in VisitFunctionDecl()
1705 SemaRef.Diag(Definition->getLocation(), diag::note_previous_definition); in VisitFunctionDecl()
1721 SemaRef.PendingLocalImplicitInstantiations.push_back( in VisitFunctionDecl()
1734 SemaRef.Diag(Function->getLocation(), diag::err_redefinition) in VisitFunctionDecl()
1736 SemaRef.Diag(R->getLocation(), diag::note_previous_definition); in VisitFunctionDecl()
1785 LocalInstantiationScope Scope(SemaRef, MergeWithParentScope); in VisitCXXMethodDecl()
1805 QualType T = adjustFunctionTypeForInstantiation(SemaRef.Context, D, TInfo); in VisitCXXMethodDecl()
1809 QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc, in VisitCXXMethodDecl()
1820 DC = SemaRef.computeDeclContext(SS); in VisitCXXMethodDecl()
1822 if (DC && SemaRef.RequireCompleteDeclContext(SS, DC)) in VisitCXXMethodDecl()
1825 DC = SemaRef.FindInstantiatedContext(D->getLocation(), in VisitCXXMethodDecl()
1838 = SemaRef.SubstDeclarationNameInfo(D->getNameInfo(), TemplateArgs); in VisitCXXMethodDecl()
1840 Method = CXXConstructorDecl::Create(SemaRef.Context, Record, in VisitCXXMethodDecl()
1846 Method = CXXDestructorDecl::Create(SemaRef.Context, Record, in VisitCXXMethodDecl()
1851 Method = CXXConversionDecl::Create(SemaRef.Context, Record, in VisitCXXMethodDecl()
1859 Method = CXXMethodDecl::Create(SemaRef.Context, Record, in VisitCXXMethodDecl()
1885 FunctionTemplate = FunctionTemplateDecl::Create(SemaRef.Context, Record, in VisitCXXMethodDecl()
1899 TemplateArgumentList::CreateCopy(SemaRef.Context, in VisitCXXMethodDecl()
1913 SemaRef.Context, in VisitCXXMethodDecl()
1929 LookupResult Previous(SemaRef, NameInfo, Sema::LookupOrdinaryName, in VisitCXXMethodDecl()
1933 SemaRef.LookupQualifiedName(Previous, Record); in VisitCXXMethodDecl()
1944 SemaRef.CheckFunctionDeclaration(nullptr, Method, Previous, false); in VisitCXXMethodDecl()
1947 SemaRef.CheckPureMethod(Method, SourceRange()); in VisitCXXMethodDecl()
1959 SemaRef.CheckOverrideControl(Method); in VisitCXXMethodDecl()
1963 SemaRef.SetDeclDefaulted(Method, Method->getLocation()); in VisitCXXMethodDecl()
1965 SemaRef.SetDeclDeleted(Method, Method->getLocation()); in VisitCXXMethodDecl()
1980 SemaRef.CheckFriendAccess(Method); in VisitCXXMethodDecl()
2007 return SemaRef.SubstParmVarDecl(D, TemplateArgs, /*indexAdjustment*/ 0, None, in VisitParmVarDecl()
2017 TemplateTypeParmDecl::Create(SemaRef.Context, Owner, in VisitTemplateTypeParmDecl()
2027 SemaRef.SubstType(D->getDefaultArgumentInfo(), TemplateArgs, in VisitTemplateTypeParmDecl()
2035 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Inst); in VisitTemplateTypeParmDecl()
2057 TypeSourceInfo *NewDI =SemaRef.SubstType(D->getExpansionTypeSourceInfo(I), in VisitNonTypeTemplateParmDecl()
2065 QualType NewT =SemaRef.CheckNonTypeTemplateParameterType(NewDI->getType(), in VisitNonTypeTemplateParmDecl()
2082 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded); in VisitNonTypeTemplateParmDecl()
2091 if (SemaRef.CheckParameterPacksForExpansion(Expansion.getEllipsisLoc(), in VisitNonTypeTemplateParmDecl()
2101 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I); in VisitNonTypeTemplateParmDecl()
2102 TypeSourceInfo *NewDI = SemaRef.SubstType(Pattern, TemplateArgs, in VisitNonTypeTemplateParmDecl()
2109 QualType NewT = SemaRef.CheckNonTypeTemplateParameterType( in VisitNonTypeTemplateParmDecl()
2126 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, -1); in VisitNonTypeTemplateParmDecl()
2127 TypeSourceInfo *NewPattern = SemaRef.SubstType(Pattern, TemplateArgs, in VisitNonTypeTemplateParmDecl()
2133 DI = SemaRef.CheckPackExpansion(NewPattern, Expansion.getEllipsisLoc(), in VisitNonTypeTemplateParmDecl()
2142 DI = SemaRef.SubstType(D->getTypeSourceInfo(), TemplateArgs, in VisitNonTypeTemplateParmDecl()
2148 T = SemaRef.CheckNonTypeTemplateParameterType(DI->getType(), in VisitNonTypeTemplateParmDecl()
2151 T = SemaRef.Context.IntTy; in VisitNonTypeTemplateParmDecl()
2159 SemaRef.Context, Owner, D->getInnerLocStart(), D->getLocation(), in VisitNonTypeTemplateParmDecl()
2164 Param = NonTypeTemplateParmDecl::Create(SemaRef.Context, Owner, in VisitNonTypeTemplateParmDecl()
2177 EnterExpressionEvaluationContext ConstantEvaluated(SemaRef, in VisitNonTypeTemplateParmDecl()
2179 ExprResult Value = SemaRef.SubstExpr(D->getDefaultArgument(), TemplateArgs); in VisitNonTypeTemplateParmDecl()
2186 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Param); in VisitNonTypeTemplateParmDecl()
2223 LocalInstantiationScope Scope(SemaRef); in VisitTemplateTemplateParmDecl()
2238 collectUnexpandedParameterPacks(SemaRef, D->getTemplateParameters(), in VisitTemplateTemplateParmDecl()
2246 if (SemaRef.CheckParameterPacksForExpansion(D->getLocation(), in VisitTemplateTemplateParmDecl()
2256 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I); in VisitTemplateTemplateParmDecl()
2257 LocalInstantiationScope Scope(SemaRef); in VisitTemplateTemplateParmDecl()
2272 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, -1); in VisitTemplateTemplateParmDecl()
2274 LocalInstantiationScope Scope(SemaRef); in VisitTemplateTemplateParmDecl()
2282 LocalInstantiationScope Scope(SemaRef); in VisitTemplateTemplateParmDecl()
2291 Param = TemplateTemplateParmDecl::Create(SemaRef.Context, Owner, in VisitTemplateTemplateParmDecl()
2298 Param = TemplateTemplateParmDecl::Create(SemaRef.Context, Owner, in VisitTemplateTemplateParmDecl()
2308 SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc, TemplateArgs); in VisitTemplateTemplateParmDecl()
2309 TemplateName TName = SemaRef.SubstTemplateName( in VisitTemplateTemplateParmDecl()
2314 SemaRef.Context, in VisitTemplateTemplateParmDecl()
2323 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Param); in VisitTemplateTemplateParmDecl()
2333 = UsingDirectiveDecl::Create(SemaRef.Context, Owner, D->getLocation(), in VisitUsingDirectiveDecl()
2359 = SemaRef.SubstNestedNameSpecifierLoc(D->getQualifierLoc(), in VisitUsingDecl()
2369 if (auto *RD = dyn_cast<CXXRecordDecl>(SemaRef.CurContext)) in VisitUsingDecl()
2370 NameInfo.setName(SemaRef.Context.DeclarationNames.getCXXConstructorName( in VisitUsingDecl()
2371 SemaRef.Context.getCanonicalType(SemaRef.Context.getRecordType(RD)))); in VisitUsingDecl()
2378 LookupResult Prev(SemaRef, NameInfo, Sema::LookupUsingDeclName, in VisitUsingDecl()
2381 UsingDecl *NewUD = UsingDecl::Create(SemaRef.Context, Owner, in VisitUsingDecl()
2391 SemaRef.LookupQualifiedName(Prev, Owner); in VisitUsingDecl()
2394 if (SemaRef.CheckUsingDeclRedeclaration(D->getUsingLoc(), in VisitUsingDecl()
2402 SemaRef.CheckUsingDeclQualifier(D->getUsingLoc(), SS, NameInfo, in VisitUsingDecl()
2406 SemaRef.Context.setInstantiatedFromUsingDecl(NewUD, D); in VisitUsingDecl()
2415 SemaRef.CheckInheritingConstructorUsingDecl(NewUD); in VisitUsingDecl()
2429 cast_or_null<NamedDecl>(SemaRef.FindInstantiatedDecl( in VisitUsingDecl()
2436 if (SemaRef.CheckUsingShadowDecl(NewUD, InstTarget, Prev, PrevDecl)) in VisitUsingDecl()
2440 PrevDecl = cast_or_null<UsingShadowDecl>(SemaRef.FindInstantiatedDecl( in VisitUsingDecl()
2445 SemaRef.BuildUsingShadowDecl(/*Scope*/nullptr, NewUD, InstTarget, in VisitUsingDecl()
2447 SemaRef.Context.setInstantiatedFromUsingShadowDecl(InstShadow, Shadow); in VisitUsingDecl()
2450 SemaRef.CurrentInstantiationScope->InstantiatedLocal(Shadow, InstShadow); in VisitUsingDecl()
2470 = SemaRef.SubstNestedNameSpecifierLoc(D->getQualifierLoc(), in VisitUnresolvedUsingTypenameDecl()
2482 SemaRef.BuildUsingDeclaration(/*Scope*/ nullptr, D->getAccess(), in VisitUnresolvedUsingTypenameDecl()
2487 SemaRef.Context.setInstantiatedFromUsingDecl(cast<UsingDecl>(UD), D); in VisitUnresolvedUsingTypenameDecl()
2495 = SemaRef.SubstNestedNameSpecifierLoc(D->getQualifierLoc(), TemplateArgs); in VisitUnresolvedUsingValueDecl()
2503 = SemaRef.SubstDeclarationNameInfo(D->getNameInfo(), TemplateArgs); in VisitUnresolvedUsingValueDecl()
2506 SemaRef.BuildUsingDeclaration(/*Scope*/ nullptr, D->getAccess(), in VisitUnresolvedUsingValueDecl()
2511 SemaRef.Context.setInstantiatedFromUsingDecl(cast<UsingDecl>(UD), D); in VisitUnresolvedUsingValueDecl()
2525 LookupResult Previous(SemaRef, NewFD->getNameInfo(), Sema::LookupOrdinaryName, in VisitClassScopeFunctionSpecializationDecl()
2535 SemaRef.LookupQualifiedName(Previous, SemaRef.CurContext); in VisitClassScopeFunctionSpecializationDecl()
2536 if (SemaRef.CheckFunctionTemplateSpecialization(NewFD, TemplateArgsPtr, in VisitClassScopeFunctionSpecializationDecl()
2545 SemaRef.Context.setClassScopeSpecializationPattern(Specialization, OldFD); in VisitClassScopeFunctionSpecializationDecl()
2554 Expr *Var = SemaRef.SubstExpr(I, TemplateArgs).get(); in VisitOMPThreadPrivateDecl()
2560 SemaRef.CheckOMPThreadPrivateDecl(D->getLocation(), Vars); in VisitOMPThreadPrivateDecl()
2571 QualType SubstReductionType = SemaRef.ActOnOpenMPDeclareReductionType( in VisitOMPDeclareReductionDecl()
2573 ParsedType::make(SemaRef.SubstType(D->getType(), TemplateArgs, in VisitOMPDeclareReductionDecl()
2584 SemaRef.CurrentInstantiationScope->findInstantiationOf(PrevDeclInScope) in VisitOMPDeclareReductionDecl()
2587 auto DRD = SemaRef.ActOnOpenMPDeclareReductionDirectiveStart( in VisitOMPDeclareReductionDecl()
2592 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, NewDRD); in VisitOMPDeclareReductionDecl()
2597 SemaRef.ActOnOpenMPDeclareReductionCombinerStart( in VisitOMPDeclareReductionDecl()
2601 DeclarationName DN(&SemaRef.Context.Idents.get(Name)); in VisitOMPDeclareReductionDecl()
2606 SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldLookup.front(), in VisitOMPDeclareReductionDecl()
2610 SubstCombiner = SemaRef.SubstExpr(D->getCombiner(), TemplateArgs).get(); in VisitOMPDeclareReductionDecl()
2611 SemaRef.ActOnOpenMPDeclareReductionCombinerEnd(NewDRD, SubstCombiner); in VisitOMPDeclareReductionDecl()
2614 SemaRef.ActOnOpenMPDeclareReductionInitializerStart( in VisitOMPDeclareReductionDecl()
2618 DeclarationName DN(&SemaRef.Context.Idents.get(Name)); in VisitOMPDeclareReductionDecl()
2623 SemaRef.CurrentInstantiationScope->InstantiatedLocal( in VisitOMPDeclareReductionDecl()
2628 SemaRef.SubstExpr(D->getInitializer(), TemplateArgs).get(); in VisitOMPDeclareReductionDecl()
2629 SemaRef.ActOnOpenMPDeclareReductionInitializerEnd(NewDRD, in VisitOMPDeclareReductionDecl()
2637 (void)SemaRef.ActOnOpenMPDeclareReductionDirectiveEnd(/*S=*/nullptr, DRD, in VisitOMPDeclareReductionDecl()
2691 if (SemaRef.Subst(ArgLocs.data(), ArgLocs.size(), in VisitClassTemplateSpecializationDecl()
2698 if (SemaRef.CheckTemplateArgumentList(InstClassTemplate, in VisitClassTemplateSpecializationDecl()
2715 SemaRef.CheckSpecializationInstantiationRedecl(D->getLocation(), in VisitClassTemplateSpecializationDecl()
2737 SemaRef.Diag(D->getLocation(), diag::err_redefinition) << PrevDecl; in VisitClassTemplateSpecializationDecl()
2738 SemaRef.Diag(PrevDecl->getDefinition()->getLocation(), in VisitClassTemplateSpecializationDecl()
2745 = ClassTemplateSpecializationDecl::Create(SemaRef.Context, in VisitClassTemplateSpecializationDecl()
2765 QualType CanonType = SemaRef.Context.getTemplateSpecializationType( in VisitClassTemplateSpecializationDecl()
2767 SemaRef.Context.getRecordType(InstD)); in VisitClassTemplateSpecializationDecl()
2776 TypeSourceInfo *WrittenTy = SemaRef.Context.getTemplateSpecializationTypeInfo( in VisitClassTemplateSpecializationDecl()
2793 SemaRef.InstantiateClass(D->getLocation(), InstD, D, TemplateArgs, in VisitClassTemplateSpecializationDecl()
2814 if (SemaRef.Subst(TemplateArgsInfo.getArgumentArray(), in VisitVarTemplateSpecializationDecl()
2820 if (SemaRef.CheckTemplateArgumentList( in VisitVarTemplateSpecializationDecl()
2845 SemaRef.SubstType(D->getTypeSourceInfo(), TemplateArgs, in VisitVarTemplateSpecializationDecl()
2851 SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function) in VisitVarTemplateSpecializationDecl()
2858 SemaRef.Context, Owner, D->getInnerLocStart(), D->getLocation(), in VisitVarTemplateSpecializationDecl()
2868 SemaRef.BuildVariableInstantiation(Var, D, TemplateArgs, LateAttrs, in VisitVarTemplateSpecializationDecl()
2880 unsigned DiagID = SemaRef.getDiagnostics().getCustomDiagID( in VisitFriendTemplateDecl()
2883 SemaRef.Diag(D->getLocation(), DiagID) in VisitFriendTemplateDecl()
2928 = TemplateParameterList::Create(SemaRef.Context, L->getTemplateLoc(), in SubstTemplateParams()
2952 LocalInstantiationScope Scope(SemaRef); in InstantiateClassTemplatePartialSpecialization()
2967 if (SemaRef.Subst(TemplArgInfo->getTemplateArgs(), in InstantiateClassTemplatePartialSpecialization()
2975 if (SemaRef.CheckTemplateArgumentList(ClassTemplate, in InstantiateClassTemplatePartialSpecialization()
2991 = SemaRef.Context.getTemplateSpecializationType(TemplateName(ClassTemplate), in InstantiateClassTemplatePartialSpecialization()
3002 = SemaRef.Context.getTemplateSpecializationTypeInfo( in InstantiateClassTemplatePartialSpecialization()
3024 SemaRef.Diag(PartialSpec->getLocation(), diag::err_partial_spec_redeclared) in InstantiateClassTemplatePartialSpecialization()
3026 SemaRef.Diag(PrevDecl->getLocation(), diag::note_prev_partial_spec_here) in InstantiateClassTemplatePartialSpecialization()
3027 << SemaRef.Context.getTypeDeclType(PrevDecl); in InstantiateClassTemplatePartialSpecialization()
3034 = ClassTemplatePartialSpecializationDecl::Create(SemaRef.Context, in InstantiateClassTemplatePartialSpecialization()
3077 LocalInstantiationScope Scope(SemaRef); in InstantiateVarTemplatePartialSpecialization()
3092 if (SemaRef.Subst(TemplArgInfo->getTemplateArgs(), in InstantiateVarTemplatePartialSpecialization()
3100 if (SemaRef.CheckTemplateArgumentList(VarTemplate, PartialSpec->getLocation(), in InstantiateVarTemplatePartialSpecialization()
3112 QualType CanonType = SemaRef.Context.getTemplateSpecializationType( in InstantiateVarTemplatePartialSpecialization()
3122 TypeSourceInfo *WrittenTy = SemaRef.Context.getTemplateSpecializationTypeInfo( in InstantiateVarTemplatePartialSpecialization()
3142 SemaRef.Diag(PartialSpec->getLocation(), in InstantiateVarTemplatePartialSpecialization()
3145 SemaRef.Diag(PrevDecl->getLocation(), in InstantiateVarTemplatePartialSpecialization()
3151 TypeSourceInfo *DI = SemaRef.SubstType( in InstantiateVarTemplatePartialSpecialization()
3158 SemaRef.Diag(PartialSpec->getLocation(), in InstantiateVarTemplatePartialSpecialization()
3167 SemaRef.Context, Owner, PartialSpec->getInnerLocStart(), in InstantiateVarTemplatePartialSpecialization()
3182 SemaRef.BuildVariableInstantiation(InstPartialSpec, PartialSpec, TemplateArgs, in InstantiateVarTemplatePartialSpecialization()
3203 = SemaRef.SubstFunctionDeclType(OldTInfo, TemplateArgs, in SubstFunctionType()
3220 LocalInstantiationScope *Scope = SemaRef.CurrentInstantiationScope; in SubstFunctionType()
3225 SemaRef.getNumArgumentsInExpansion(OldParam->getType(), in SubstFunctionType()
3253 Params.push_back(SemaRef.BuildParmVarDeclForTypedef( in SubstFunctionType()
3278 if (SemaRef.SubstParmTypes(D->getLocation(), D->parameters(), nullptr, in SubstFunctionType()
3396 SemaRef.Context.setManglingNumber(New, in InitFunctionInstantiation()
3397 SemaRef.Context.getManglingNumber(Tmpl)); in InitFunctionInstantiation()
3408 ActiveInstType &ActiveInst = SemaRef.ActiveTemplateInstantiations.back(); in InitFunctionInstantiation()
3431 if (SemaRef.getLangOpts().CPlusPlus11 && in InitFunctionInstantiation()
3451 New->setType(SemaRef.Context.getFunctionType( in InitFunctionInstantiation()
3454 SemaRef.SubstExceptionSpec(New, Proto, TemplateArgs); in InitFunctionInstantiation()
3462 SemaRef.InstantiateAttrs(TemplateArgs, Definition, New, in InitFunctionInstantiation()