Home | History | Annotate | Download | only in Sema

Lines Matching refs:SemaRef

34     = SemaRef.SubstNestedNameSpecifierLoc(OldDecl->getQualifierLoc(),
50 = SemaRef.SubstNestedNameSpecifierLoc(OldDecl->getQualifierLoc(),
160 LabelDecl *Inst = LabelDecl::Create(SemaRef.Context, Owner, D->getLocation(),
174 = NamespaceAliasDecl::Create(SemaRef.Context, Owner,
191 DI = SemaRef.SubstType(DI, TemplateArgs,
195 DI = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.Context.IntTy);
198 SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType());
209 RD->getEnclosingNamespaceContext() == SemaRef.getStdNamespace() &&
212 SemaRef.getSourceManager().isInSystemHeader(D->getLocStart()))
214 DI = SemaRef.Context.getTrivialTypeSourceInfo(
220 Typedef = TypeAliasDecl::Create(SemaRef.Context, Owner, D->getLocStart(),
223 Typedef = TypedefDecl::Create(SemaRef.Context, Owner, D->getLocStart(),
240 NamedDecl *InstPrev = SemaRef.FindInstantiatedDecl(D->getLocation(), Prev,
248 SemaRef.isIncompatibleTypedef(InstPrevTypedef, Typedef);
253 SemaRef.InstantiateAttrs(TemplateArgs, D, Typedef);
276 LocalInstantiationScope Scope(SemaRef);
299 = TypeAliasTemplateDecl::Create(SemaRef.Context, Owner, D->getLocation(),
323 TypeSourceInfo *DI = SemaRef.SubstType(D->getTypeSourceInfo(),
331 SemaRef.Diag(D->getLocation(), diag::err_variable_instantiates_to_function)
337 VarDecl *Var = VarDecl::Create(SemaRef.Context, Owner,
365 SemaRef.InstantiateAttrs(TemplateArgs, D, Var, LateAttrs, StartingScope);
368 SemaRef.CheckAlignasUnderalignment(Var);
373 LookupResult Previous(SemaRef, Var->getDeclName(), Var->getLocation(),
376 SemaRef.LookupQualifiedName(Previous, Owner, false);
379 if (SemaRef.getLangOpts().ObjCAutoRefCount &&
380 SemaRef.inferObjCARCLifetime(Var))
383 SemaRef.CheckVariableDeclaration(Var, Previous);
391 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Var);
397 SemaRef.Context.setInstantiatedFromStaticDataMember(Var, D,
404 SemaRef.PushExpressionEvaluationContext(Sema::ConstantEvaluated, D);
406 SemaRef.PushExpressionEvaluationContext(Sema::PotentiallyEvaluated, D);
409 ExprResult Init = SemaRef.SubstInitializer(D->getInit(), TemplateArgs,
415 SemaRef.AddInitializerToDecl(Var, Init.take(), DirectInit,
418 SemaRef.ActOnUninitializedDecl(Var, TypeMayContainAuto);
425 SemaRef.PopExpressionEvaluationContext();
428 SemaRef.ActOnUninitializedDecl(Var, false);
434 SemaRef.DiagnoseUnusedDecl(Var);
441 = AccessSpecDecl::Create(SemaRef.Context, D->getAccess(), Owner,
452 DI = SemaRef.SubstType(DI, TemplateArgs,
464 SemaRef.Diag(D->getLocation(), diag::err_field_instantiates_to_function)
469 SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType());
477 EnterExpressionEvaluationContext Unevaluated(SemaRef,
481 = SemaRef.SubstExpr(BitWidth, TemplateArgs);
489 FieldDecl *Field = SemaRef.CheckFieldDecl(D->getDeclName(),
504 SemaRef.InstantiateAttrs(TemplateArgs, D, Field, LateAttrs, StartingScope);
507 SemaRef.CheckAlignasUnderalignment(Field);
514 SemaRef.Context.setInstantiatedFromUnnamedFieldDecl(Field, D);
519 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Field);
531 new (SemaRef.Context)NamedDecl*[D->getChainingSize()];
537 NamedDecl *Next = SemaRef.FindInstantiatedDecl(D->getLocation(), *PI,
547 = IndirectFieldDecl::Create(SemaRef.Context, Owner, D->getLocation(),
570 InstTy = SemaRef.SubstType(Ty, TemplateArgs,
576 FriendDecl *FD = SemaRef.CheckFriendTypeDecl(D->getLocStart(),
598 FriendDecl::Create(SemaRef.Context, Owner, D->getLocation(),
610 EnterExpressionEvaluationContext Unevaluated(SemaRef,
614 = SemaRef.SubstExpr(AssertExpr, TemplateArgs);
618 return SemaRef.BuildStaticAssertDeclaration(D->getLocation(),
628 NamedDecl *Prev = SemaRef.FindInstantiatedDecl(D->getLocation(),
635 EnumDecl *Enum = EnumDecl::Create(SemaRef.Context, Owner, D->getLocStart(),
645 TypeSourceInfo *NewTI = SemaRef.SubstType(TI, TemplateArgs, UnderlyingLoc,
647 if (!NewTI || SemaRef.CheckEnumUnderlyingType(NewTI))
648 Enum->setIntegerType(SemaRef.Context.IntTy);
658 SemaRef.InstantiateAttrs(TemplateArgs, D, Enum);
673 SemaRef.SubstType(TI->getType(), TemplateArgs,
675 SemaRef.CheckEnumRedeclaration(Def->getLocation(), Def->isScoped(),
681 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Enum);
711 ExprResult Value = SemaRef.Owned((Expr *)0);
714 EnterExpressionEvaluationContext Unevaluated(SemaRef,
717 Value = SemaRef.SubstExpr(UninstValue, TemplateArgs);
723 Value = SemaRef.Owned((Expr *)0);
728 = SemaRef.CheckEnumConstant(Enum, LastEnumConst,
739 SemaRef.InstantiateAttrs(TemplateArgs, *EC, EnumConst);
750 SemaRef.CurrentInstantiationScope->InstantiatedLocal(*EC, EnumConst);
756 SemaRef.ActOnEnumBody(Enum->getLocation(), SourceLocation(),
771 LocalInstantiationScope Scope(SemaRef);
784 QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc,
811 DC = SemaRef.computeDeclContext(SS);
814 DC = SemaRef.FindInstantiatedContext(Pattern->getLocation(),
821 LookupResult R(SemaRef, Pattern->getDeclName(), Pattern->getLocation(),
823 SemaRef.LookupQualifiedName(R, DC);
832 SemaRef.Diag(Pattern->getLocation(), diag::err_not_tag_in_scope)
870 if (!SemaRef.TemplateParameterListsAreEqual(InstParams, PrevParams,
883 SemaRef.CheckTemplateParameterList(InstParams, PrevParams,
890 = CXXRecordDecl::Create(SemaRef.Context, Pattern->getTagKind(), DC,
899 = ClassTemplateDecl::Create(SemaRef.Context, DC, D->getLocation(),
920 SemaRef.Context.getInjectedClassNameType(RecordInst,
982 LocalInstantiationScope Scope(SemaRef);
1022 SemaRef.CheckFriendAccess(InstTemplate);
1033 NamedDecl *Prev = SemaRef.FindInstantiatedDecl(D->getLocation(),
1041 = CXXRecordDecl::Create(SemaRef.Context, D->getTagKind(), Owner,
1067 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Record);
1132 LocalInstantiationScope Scope(SemaRef, MergeWithParentScope);
1138 QualType T = adjustFunctionTypeForInstantiation(SemaRef.Context, D, TInfo);
1142 QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc,
1156 DC = SemaRef.computeDeclContext(SS);
1159 DC = SemaRef.FindInstantiatedContext(D->getLocation(), D->getDeclContext(),
1164 FunctionDecl::Create(SemaRef.Context, DC, D->getInnerLocStart(),
1199 = SemaRef.BuildParmVarDeclForTypedef(Function, Function->getLocation(),
1223 FunctionTemplate = FunctionTemplateDecl::Create(SemaRef.Context, DC,
1242 TemplateArgumentList::CreateCopy(SemaRef.Context,
1261 LookupResult Previous(SemaRef, Function->getDeclName(), SourceLocation(),
1274 SemaRef.Subst(Info->getTemplateArgs(), Info->getNumTemplateArgs(),
1280 Decl *Temp = SemaRef.FindInstantiatedDecl(D->getLocation(),
1288 if (SemaRef.CheckFunctionTemplateSpecialization(Function,
1299 SemaRef.LookupQualifiedName(Previous, DC);
1309 SemaRef.CheckFunctionDeclaration(/*Scope*/ 0, Function, Previous,
1340 if ((!SemaRef.getLangOpts().CPlusPlus11 ||
1341 SemaRef.Diags.getDiagnosticLevel(
1350 SemaRef.Diag(Function->getLocation(),
1351 SemaRef.getLangOpts().CPlusPlus11 ?
1354 SemaRef.Diag(Definition->getLocation(), diag::note_previous_definition);
1355 if (!SemaRef.getLangOpts().CPlusPlus11)
1367 if (!SemaRef.getLangOpts().CPlusPlus11 &&
1374 SemaRef.PendingLocalImplicitInstantiations.push_back(
1385 SemaRef.Diag(Function->getLocation(),
1386 SemaRef.getLangOpts().CPlusPlus11 ?
1390 SemaRef.Diag(R->getLocation(), diag::note_previous_definition);
1391 if (!SemaRef.getLangOpts().CPlusPlus11)
1439 LocalInstantiationScope Scope(SemaRef, MergeWithParentScope);
1459 QualType T = adjustFunctionTypeForInstantiation(SemaRef.Context, D, TInfo);
1473 if (SemaRef.SubstParmTypes(D->getLocation(), D->param_begin(),
1481 QualifierLoc = SemaRef.SubstNestedNameSpecifierLoc(QualifierLoc,
1492 DC = SemaRef.computeDeclContext(SS);
1494 if (DC && SemaRef.RequireCompleteDeclContext(SS, DC))
1497 DC = SemaRef.FindInstantiatedContext(D->getLocation(),
1510 = SemaRef.SubstDeclarationNameInfo(D->getNameInfo(), TemplateArgs);
1512 Method = CXXConstructorDecl::Create(SemaRef.Context, Record,
1518 Method = CXXDestructorDecl::Create(SemaRef.Context, Record,
1523 Method = CXXConversionDecl::Create(SemaRef.Context, Record,
1530 Method = CXXMethodDecl::Create(SemaRef.Context, Record,
1558 FunctionTemplate = FunctionTemplateDecl::Create(SemaRef.Context, Record,
1573 TemplateArgumentList::CreateCopy(SemaRef.Context,
1587 Method->setTemplateParameterListsInfo(SemaRef.Context,
1604 LookupResult Previous(SemaRef, NameInfo, Sema::LookupOrdinaryName,
1608 SemaRef.LookupQualifiedName(Previous, Record);
1619 SemaRef.CheckFunctionDeclaration(0, Method, Previous, false);
1622 SemaRef.CheckPureMethod(Method, SourceRange());
1634 SemaRef.CheckOverrideControl(Method);
1638 SemaRef.SetDeclDefaulted(Method, Method->getLocation());
1640 SemaRef.SetDeclDeleted(Method, Method->getLocation());
1655 SemaRef.CheckFriendAccess(Method);
1682 return SemaRef.SubstParmVarDecl(D, TemplateArgs, /*indexAdjustment*/ 0, None,
1692 TemplateTypeParmDecl::Create(SemaRef.Context, Owner,
1705 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Inst);
1727 TypeSourceInfo *NewDI =SemaRef.SubstType(D->getExpansionTypeSourceInfo(I),
1735 QualType NewT =SemaRef.CheckNonTypeTemplateParameterType(NewDI->getType(),
1752 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded);
1761 if (SemaRef.CheckParameterPacksForExpansion(Expansion.getEllipsisLoc(),
1771 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I);
1772 TypeSourceInfo *NewDI = SemaRef.SubstType(Pattern, TemplateArgs,
1779 QualType NewT = SemaRef.CheckNonTypeTemplateParameterType(
1796 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, -1);
1797 TypeSourceInfo *NewPattern = SemaRef.SubstType(Pattern, TemplateArgs,
1803 DI = SemaRef.CheckPackExpansion(NewPattern, Expansion.getEllipsisLoc(),
1812 DI = SemaRef.SubstType(D->getTypeSourceInfo(), TemplateArgs,
1818 T = SemaRef.CheckNonTypeTemplateParameterType(DI->getType(),
1821 T = SemaRef.Context.IntTy;
1828 Param = NonTypeTemplateParmDecl::Create(SemaRef.Context, Owner,
1839 Param = NonTypeTemplateParmDecl::Create(SemaRef.Context, Owner,
1855 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Param);
1893 LocalInstantiationScope Scope(SemaRef);
1908 collectUnexpandedParameterPacks(SemaRef, D->getTemplateParameters(),
1916 if (SemaRef.CheckParameterPacksForExpansion(D->getLocation(),
1926 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I);
1927 LocalInstantiationScope Scope(SemaRef);
1942 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, -1);
1944 LocalInstantiationScope Scope(SemaRef);
1952 LocalInstantiationScope Scope(SemaRef);
1961 Param = TemplateTemplateParmDecl::Create(SemaRef.Context, Owner,
1968 Param = TemplateTemplateParmDecl::Create(SemaRef.Context, Owner,
1979 SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Param);
1989 = UsingDirectiveDecl::Create(SemaRef.Context, Owner, D->getLocation(),
2015 = SemaRef.SubstNestedNameSpecifierLoc(D->getQualifierLoc(),
2029 LookupResult Prev(SemaRef, NameInfo, Sema::LookupUsingDeclName,
2032 UsingDecl *NewUD = UsingDecl::Create(SemaRef.Context, Owner,
2042 SemaRef.LookupQualifiedName(Prev, Owner);
2045 if (SemaRef.CheckUsingDeclRedeclaration(D->getUsingLocation(),
2053 SemaRef.CheckUsingDeclQualifier(D->getUsingLocation(), SS,
2057 SemaRef.Context.setInstantiatedFromUsingDecl(NewUD, D);
2066 if (SemaRef.CheckInheritingConstructorUsingDecl(NewUD))
2078 cast_or_null<NamedDecl>(SemaRef.FindInstantiatedDecl(
2086 SemaRef.CheckUsingShadowDecl(NewUD, InstTarget, Prev))
2090 = SemaRef.BuildUsingShadowDecl(/*Scope*/ 0, NewUD, InstTarget);
2091 SemaRef.Context.setInstantiatedFromUsingShadowDecl(InstShadow, Shadow);
2094 SemaRef.CurrentInstantiationScope->InstantiatedLocal(Shadow, InstShadow);
2108 = SemaRef.SubstNestedNameSpecifierLoc(D->getQualifierLoc(),
2120 SemaRef.BuildUsingDeclaration(/*Scope*/ 0, D->getAccess(),
2125 SemaRef.Context.setInstantiatedFromUsingDecl(cast<UsingDecl>(UD), D);
2133 = SemaRef.SubstNestedNameSpecifierLoc(D->getQualifierLoc(), TemplateArgs);
2141 = SemaRef.SubstDeclarationNameInfo(D->getNameInfo(), TemplateArgs);
2144 SemaRef.BuildUsingDeclaration(/*Scope*/ 0, D->getAccess(),
2149 SemaRef.Context.setInstantiatedFromUsingDecl(cast<UsingDecl>(UD), D);
2161 LookupResult Previous(SemaRef, NewFD->getNameInfo(), Sema::LookupOrdinaryName,
2171 SemaRef.LookupQualifiedName(Previous, SemaRef.CurContext);
2172 if (SemaRef.CheckFunctionTemplateSpecialization(NewFD, TemplateArgsPtr,
2181 SemaRef.Context.setClassScopeSpecializationPattern(Specialization, OldFD);
2222 = TemplateParameterList::Create(SemaRef.Context, L->getTemplateLoc(),
2246 LocalInstantiationScope Scope(SemaRef);
2258 if (SemaRef.Subst(PartialSpec->getTemplateArgsAsWritten(),
2266 if (SemaRef.CheckTemplateArgumentList(ClassTemplate,
2283 = SemaRef.Context.getTemplateSpecializationType(TemplateName(ClassTemplate),
2295 = SemaRef.Context.getTemplateSpecializationTypeInfo(
2317 SemaRef.Diag(PartialSpec->getLocation(), diag::err_partial_spec_redeclared)
2319 SemaRef.Diag(PrevDecl->getLocation(), diag::note_prev_partial_spec_here)
2320 << SemaRef.Context.getTypeDeclType(PrevDecl);
2327 = ClassTemplatePartialSpecializationDecl::Create(SemaRef.Context,
2368 = SemaRef.SubstFunctionDeclType(OldTInfo, TemplateArgs,
2386 LocalInstantiationScope *Scope = SemaRef.CurrentInstantiationScope;
2391 SemaRef.getNumArgumentsInExpansion(OldParam->getType(),
2463 static void InstantiateExceptionSpec(Sema &SemaRef, FunctionDecl *New,
2480 Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext, ThisTypeQuals,
2481 SemaRef.getLangOpts().CPlusPlus11);
2492 SemaRef.collectUnexpandedParameterPacks(PackExpansion->getPattern(),
2501 if (SemaRef.CheckParameterPacksForExpansion(New->getLocation(),
2514 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, -1);
2515 QualType T = SemaRef.SubstType(PackExpansion->getPattern(),
2521 T = SemaRef.Context.getPackExpansionType(T, NumExpansions);
2529 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, ArgIdx);
2531 QualType T = SemaRef.SubstType(PackExpansion->getPattern(),
2549 = SemaRef.SubstType(Proto->getExceptionType(I), TemplateArgs,
2552 SemaRef.CheckSpecifiedExceptionType(T, New->getLocation()))
2559 EnterExpressionEvaluationContext Unevaluated(SemaRef,
2561 ExprResult E = SemaRef.SubstExpr(OldNoexceptExpr, TemplateArgs);
2563 E = SemaRef.CheckBooleanCondition(E.get(), E.get()->getLocStart());
2570 = SemaRef.VerifyIntegerConstantExpression(NoexceptExpr,
2587 New->setType(SemaRef.Context.getFunctionType(NewProto->getResultType(),
2648 ActiveInstType &ActiveInst = SemaRef.ActiveTemplateInstantiations.back();
2669 if (SemaRef.getLangOpts().CPlusPlus11 &&
2687 New->setType(SemaRef.Context.getFunctionType(NewProto->getResultType(),
2692 ::InstantiateExceptionSpec(SemaRef, New, Proto, TemplateArgs);
2700 SemaRef.InstantiateAttrs(TemplateArgs, Definition, New,