• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/clang/lib/Sema/

Lines Matching defs:SemaRef

118   Sema &SemaRef;
127 TreeTransform(Sema &SemaRef) : SemaRef(SemaRef) { }
142 Sema &getSema() const { return SemaRef; }
153 bool AlwaysRebuild() { return SemaRef.ArgumentPackSubstitutionIndex != -1; }
621 return SemaRef.Context.getTrivialTypeSourceInfo(T,
918 return SemaRef.Context.getTypeDeclType(Typedef);
924 return SemaRef.Context.getMacroQualifiedType(T, MacroII);
929 return SemaRef.Context.getTypeDeclType(Record);
934 return SemaRef.Context.getTypeDeclType(Enum);
968 return SemaRef.Context.getAutoType(Deduced, Keyword,
978 return SemaRef.Context.getDeducedTemplateSpecializationType(
996 return SemaRef.BuildParenType(InnerType);
1008 return SemaRef.Context.getElaboratedType(Keyword,
1039 return SemaRef.Context.getDependentTemplateSpecializationType(Keyword,
1053 return SemaRef.Context.getElaboratedType(Keyword,
1074 if (!SemaRef.computeDeclContext(SS))
1075 return SemaRef.Context.getDependentNameType(Keyword,
1081 return SemaRef.CheckTypenameType(Keyword, KeywordLoc, QualifierLoc,
1090 LookupResult Result(SemaRef, Id, IdLoc, Sema::LookupTagName);
1091 DeclContext *DC = SemaRef.computeDeclContext(SS, false);
1095 if (SemaRef.RequireCompleteDeclContext(SS, DC))
1099 SemaRef.LookupQualifiedName(Result, DC);
1121 LookupResult Result(SemaRef, Id, IdLoc, Sema::LookupTagName);
1122 SemaRef.LookupQualifiedName(Result, DC);
1128 Sema::NonTagKind NTK = SemaRef.getNonTagTypeDeclKind(SomeDecl, Kind);
1129 SemaRef.Diag(IdLoc, diag::err_tag_reference_non_tag) << SomeDecl
1131 SemaRef.Diag(SomeDecl->getLocation(), diag::note_declared_at);
1135 SemaRef.Diag(IdLoc, diag::err_not_tag_in_scope)
1142 if (!SemaRef.isAcceptableTagRedeclaration(Tag, Kind, /*isDefinition*/false,
1144 SemaRef.Diag(KeywordLoc, diag::err_use_with_wrong_tag) << Id;
1145 SemaRef.Diag(Tag->getLocation(), diag::note_previous_use);
1150 QualType T = SemaRef.Context.getTypeDeclType(Tag);
1151 return SemaRef.Context.getElaboratedType(Keyword,
1278 return SemaRef.ActOnLabelStmt(IdentLoc, L, ColonLoc, SubStmt);
1288 return SemaRef.ActOnAttributedStmt(AttrLoc, Attrs, SubStmt);
2133 return SemaRef.Diag(Init->getBeginLoc(),
2471 return SemaRef.BuildInitList(LBraceLoc, Inits, RBraceLoc);
2484 = SemaRef.ActOnDesignatedInitializer(Desig, EqualOrColonLoc, GNUSyntax,
2498 return new (SemaRef.Context) ImplicitValueInitExpr(T);
2550 return SemaRef.ActOnChooseExpr(BuiltinLoc,
3008 return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType,
3031 return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType,
3043 return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd());
3053 return SizeOfPackExpr::Create(SemaRef.Context, OperatorLoc, Pack, PackLoc,
3097 return RequiresExpr::Create(SemaRef.Context, RequiresKWLoc, Body,
3104 return SemaRef.BuildTypeRequirement(SubstDiag);
3108 return SemaRef.BuildTypeRequirement(T);
3116 return SemaRef.BuildExprRequirement(SubstDiag, IsSimple, NoexceptLoc,
3123 return SemaRef.BuildExprRequirement(E, IsSimple, NoexceptLoc,
3130 return SemaRef.BuildNestedRequirement(SubstDiag);
3134 return SemaRef.BuildNestedRequirement(Constraint);
3179 return SemaRef.BuildObjCEncodeExpression(AtLoc, EncodeTypeInfo, RParenLoc);
3190 return SemaRef.BuildClassMessage(ReceiverTypeInfo,
3205 return SemaRef.BuildInstanceMessage(Receiver,
3221 return Method->isInstanceMethod() ? SemaRef.BuildInstanceMessage(nullptr,
3226 : SemaRef.BuildClassMessage(nullptr,
3316 = SemaRef.Context.Idents.get("__builtin_shufflevector");
3317 TranslationUnitDecl *TUDecl = SemaRef.Context.getTranslationUnitDecl();
3323 Expr *Callee = new (SemaRef.Context)
3324 DeclRefExpr(SemaRef.Context, Builtin, false,
3325 SemaRef.Context.BuiltinFnTy, VK_RValue, BuiltinLoc);
3326 QualType CalleePtrTy = SemaRef.Context.getPointerType(Builtin->getType());
3327 Callee = SemaRef.ImpCastExprToType(Callee, CalleePtrTy,
3332 SemaRef.Context, Callee, SubExprs, Builtin->getCallResultType(),
3336 return SemaRef.SemaBuiltinShuffleVector(cast<CallExpr>(TheCall.get()));
3343 return SemaRef.SemaConvertVectorExpr(SrcExpr, DstTInfo,
3775 if (SemaRef.BuildCXXNestedNameSpecifier(/*Scope=*/nullptr, IdInfo, false,
3787 SS.Extend(SemaRef.Context, NS, Q.getLocalBeginLoc(), Q.getLocalEndLoc());
3796 SS.Extend(SemaRef.Context, Alias, Q.getLocalBeginLoc(),
3804 SS.MakeGlobal(SemaRef.Context, Q.getBeginLoc());
3811 SS.MakeSuper(SemaRef.Context, RD, Q.getBeginLoc(), Q.getEndLoc());
3824 (SemaRef.getLangOpts().CPlusPlus11 &&
3829 SemaRef.Diag(TL.getBeginLoc(),
3831 SS.Extend(SemaRef.Context, /*FIXME:*/SourceLocation(), TL,
3839 SemaRef.Diag(TL.getBeginLoc(), diag::err_nested_name_spec_non_tag)
3863 return SS.getWithLocInContext(SemaRef.Context);
3893 SemaRef.Context.DeclarationNames.getCXXDeductionGuideName(NewTemplate));
3906 NewCanTy = SemaRef.Context.getCanonicalType(NewTInfo->getType());
3914 NewCanTy = SemaRef.Context.getCanonicalType(NewT);
3918 = SemaRef.Context.DeclarationNames.getCXXSpecialName(Name.getNameKind(),
4124 E = SemaRef.ActOnConstantExpression(E);
4353 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
4419 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
4453 SemaRef.Diag(Loc, diag::err_address_space_mismatch_templ_inst)
4462 T = SemaRef.getASTContext().getAddrSpaceQualType(T,
4494 Replacement = SemaRef.Context.getQualifiedType(
4496 T = SemaRef.Context.getSubstTemplateTypeParmType(
4504 SemaRef.Context.getQualifiedType(Deduced.getUnqualifiedType(), Qs);
4505 T = SemaRef.Context.getAutoType(Deduced, AutoTy->getKeyword(),
4514 SemaRef.Diag(Loc, diag::err_attr_objc_ownership_redundant) << T;
4520 return SemaRef.BuildQualifiedType(T, Loc, Quals);
4600 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
4644 Result = SemaRef.Context.getDecayedType(OriginalType);
4664 Result = SemaRef.Context.getObjCObjectPointerType(PointeeType);
4833 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
4835 NewSize = SemaRef.ActOnConstantExpression(NewSize).get();
4903 SemaRef, Sema::ExpressionEvaluationContext::PotentiallyEvaluated);
4909 SemaRef.ActOnFinishFullExpr(SizeResult.get(), /*DiscardedValue*/ false);
4949 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
4957 sizeResult = SemaRef.ActOnConstantExpression(sizeResult);
4995 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
4998 Size = SemaRef.ActOnConstantExpression(Size);
5037 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
5040 Size = SemaRef.ActOnConstantExpression(Size);
5080 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
5083 AddrSpace = SemaRef.ActOnConstantExpression(AddrSpace);
5193 NewDI = TLB.getTypeSourceInfo(SemaRef.Context, Result);
5202 ParmVarDecl *newParm = ParmVarDecl::Create(SemaRef.Context,
5241 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded);
5493 Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext, ThisTypeQuals);
5590 SemaRef.collectUnexpandedParameterPacks(PackExpansion->getPattern(),
5616 U = SemaRef.Context.getPackExpansionType(U, NumExpansions);
5627 if (U.isNull() || SemaRef.CheckSpecifiedExceptionType(U, Loc))
5634 if (U.isNull() || SemaRef.CheckSpecifiedExceptionType(U, Loc))
5723 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated,
5730 E = SemaRef.HandleExprEvaluationContextForTypeof(E.get());
5782 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated, nullptr,
5918 QualType T = SemaRef.Context.getTypeDeclType(cast<TypeDecl>(D));
5945 Replacement = SemaRef.Context.getCanonicalType(Replacement);
5947 = SemaRef.Context.getSubstTemplateTypeParmType(T->getReplacedParameter(),
6241 NewTL.setQualifierLoc(SS.getWithLocInContext(SemaRef.Context));
6300 SemaRef.Diag(TL.getNamedTypeLoc().getBeginLoc(),
6304 SemaRef.Diag(TAT->getLocation(), diag::note_declared_at);
6357 SemaRef.Diag(TL.getAttr()->getLocation(),
6364 result = SemaRef.Context.getAttributedType(TL.getAttrKind(),
6631 SemaRef.collectUnexpandedParameterPacks(PackExpansion->getPattern(),
6659 QualType NewExpansionType = SemaRef.Context.getPackExpansionType(
6664 TypeArgBuilder.getTypeSourceInfo(SemaRef.Context, NewExpansionType));
6682 TypeArgBuilder.getTypeSourceInfo(SemaRef.Context, NewTypeArg));
6701 TypeArgBuilder.getTypeSourceInfo(SemaRef.Context, NewTypeArg));
6816 SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
6820 LHS = SemaRef.ActOnCaseExpr(S->getCaseLoc(), LHS);
6826 RHS = SemaRef.ActOnCaseExpr(S->getCaseLoc(), RHS);
7127 Target = SemaRef.MaybeCreateExprWithCleanups(Target.get());
7297 auto *ScopeInfo = SemaRef.getCurFunction();
7298 auto *FD = cast<FunctionDecl>(SemaRef.CurContext);
7315 if (!SemaRef.buildCoroutineParameterMoves(FD->getLocation()))
7317 auto *Promise = SemaRef.buildCoroutinePromise(FD->getLocation());
7340 CoroutineStmtBuilder Builder(SemaRef, *FD, *ScopeInfo, BodyRes.get());
7755 Cond = SemaRef.CheckBooleanCondition(S->getColonLoc(), Cond.get());
7759 Cond = SemaRef.MaybeCreateExprWithCleanups(Cond.get());
7765 Inc = SemaRef.MaybeCreateExprWithCleanups(Inc.get());
7904 return new (SemaRef.getASTContext())
7906 SemaRef.getASTContext().PseudoObjectTy, VK_LValue,
8942 SemaRef.Context, /*NamingClass=*/nullptr,
8943 ReductionIdScopeSpec.getWithLocInContext(SemaRef.Context),
8988 SemaRef.Context, /*NamingClass=*/nullptr,
8989 ReductionIdScopeSpec.getWithLocInContext(SemaRef.Context), NameInfo,
9033 SemaRef.Context, /*NamingClass=*/nullptr,
9034 ReductionIdScopeSpec.getWithLocInContext(SemaRef.Context), NameInfo,
9461 SemaRef.MarkDeclRefReferenced(E);
9521 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), FD);
9522 return SemaRef.MaybeBindToTemporary(E);
9693 Expr *newSyntacticForm = SemaRef.recreateSyntacticForm(E);
9701 result = SemaRef.checkPseudoObjectRValue(result.get());
9729 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated,
9829 return SemaRef.MaybeBindToTemporary(E);
9881 SemaRef.MarkMemberReferenced(E);
9898 SemaRef.getLocForEndOfToken(E->getBase()->getSourceRange().getEnd());
10098 return SemaRef.MaybeBindToTemporary(E);
10122 SemaRef.getLocForEndOfToken(E->getBase()->getEndLoc());
10340 SemaRef.ActOnStartStmtExpr();
10344 SemaRef.ActOnStmtExprError();
10354 SemaRef.ActOnStmtExprError();
10355 return SemaRef.MaybeBindToTemporary(E);
10414 SourceLocation FakeLParenLoc = SemaRef.getLocForEndOfToken(
10466 return SemaRef.MaybeBindToTemporary(E);
10520 return SemaRef.MaybeBindToTemporary(E);
10642 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated,
10675 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
10741 E->getUsedContext() == SemaRef.CurContext)
10756 E->getUsedContext() == SemaRef.CurContext)
10843 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), OperatorNew);
10845 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), OperatorDelete);
10849 = SemaRef.Context.getBaseElementType(E->getAllocatedType());
10852 if (CXXDestructorDecl *Destructor = SemaRef.LookupDestructor(Record)) {
10853 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), Destructor);
10868 const ArrayType *ArrayT = SemaRef.Context.getAsArrayType(AllocType);
10873 ArraySize = IntegerLiteral::Create(SemaRef.Context, ConsArrayT->getSize(),
10874 SemaRef.Context.getSizeType(),
10915 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), OperatorDelete);
10918 QualType Destroyed = SemaRef.Context.getBaseElementType(
10922 SemaRef.MarkFunctionReferenced(E->getBeginLoc(),
10923 SemaRef.LookupDestructor(Record));
10944 Base = SemaRef.ActOnStartCXXMemberReference(nullptr, Base.get(),
10978 ParsedType T = SemaRef.getDestructorName(E->getTildeLoc(),
10988 = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.GetTypeFromParser(T),
11071 LookupResult R(SemaRef, Old->getName(), Old->getNameLoc(),
11112 return SemaRef.BuildPossibleImplicitMemberExpr(SS, TemplateKWLoc, R,
11153 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
11165 SemaRef.collectUnexpandedParameterPacks(PatternTL, Unexpanded);
11204 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
11211 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I);
11231 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
11258 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
11294 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
11439 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
11458 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
11582 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), Constructor);
11610 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), Constructor);
11671 SemaRef.MarkFunctionReferenced(E->getBeginLoc(), Constructor);
11672 return SemaRef.MaybeBindToTemporary(E);
11733 SemaRef.collectUnexpandedParameterPacks(OldVD->getInit(), Unexpanded);
12096 Base = SemaRef.ActOnStartCXXMemberReference(nullptr, Base.get(),
12208 LookupResult R(SemaRef, Old->getMemberNameInfo(),
12259 SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
12585 return SemaRef.MaybeBindToTemporary(E);
12619 return SemaRef.MaybeBindToTemporary(E);
12742 return SemaRef.MaybeBindToTemporary(E);
12792 return SemaRef.BuildObjCBridgedCast(E->getLParenLoc(), E->getBridgeKind(),
12824 return SemaRef.MaybeBindToTemporary(E);
12866 return SemaRef.MaybeBindToTemporary(E);
12938 SemaRef.Context.PseudoObjectTy,
13031 SemaRef.ActOnBlockStart(E->getCaretLocation(), /*Scope=*/nullptr);
13032 BlockScopeInfo *blockScope = SemaRef.getCurBlock();
13082 if (!SemaRef.getDiagnostics().hasErrorOccurred()) {
13099 return SemaRef.ActOnBlockStmtExpr(E->getCaretLocation(), body.get(),
13134 return SemaRef.BuildPointerType(PointeeType, Star,
13141 return SemaRef.BuildBlockPointerType(PointeeType, Star,
13150 return SemaRef.BuildReferenceType(ReferentType, WrittenAsLValue,
13159 return SemaRef.BuildMemberPointerType(PointeeType, ClassType, Sigil,
13170 return SemaRef.BuildObjCTypeParamType(Decl,
13187 return SemaRef.BuildObjCObjectType(BaseType, Loc, TypeArgsLAngleLoc,
13198 return SemaRef.Context.getObjCObjectPointerType(PointeeType);
13210 return SemaRef.BuildArrayType(ElementType, SizeMod, SizeExpr,
13215 SemaRef.Context.UnsignedCharTy, SemaRef.Context.UnsignedShortTy,
13216 SemaRef.Context.UnsignedIntTy, SemaRef.Context.UnsignedLongTy,
13217 SemaRef.Context.UnsignedLongLongTy, SemaRef.Context.UnsignedInt128Ty
13222 if (Size->getBitWidth() == SemaRef.Context.getIntWidth(Types[I])) {
13230 = IntegerLiteral::Create(SemaRef.Context, *Size, SizeType,
13232 return SemaRef.BuildArrayType(ElementType, SizeMod, ArraySize,
13286 return SemaRef.BuildAddressSpaceAttr(PointeeType, AddrSpaceExpr,
13296 return SemaRef.Context.getVectorType(ElementType, NumElements, VecKind);
13303 return SemaRef.BuildVectorType(ElementType, SizeExpr, AttributeLoc);
13310 llvm::APInt numElements(SemaRef.Context.getIntWidth(SemaRef.Context.IntTy),
13313 = IntegerLiteral::Create(SemaRef.Context, numElements, SemaRef.Context.IntTy,
13315 return SemaRef.BuildExtVectorType(ElementType, VectorSize, AttributeLoc);
13323 return SemaRef.BuildExtVectorType(ElementType, SizeExpr, AttributeLoc);
13331 return SemaRef.BuildFunctionType(T, ParamTypes,
13339 return SemaRef.Context.getFunctionNoProtoType(T);
13391 return SemaRef.Context.getTypeDeclType(Ty);
13397 return SemaRef.BuildTypeofExprType(E, Loc);
13402 return SemaRef.Context.getTypeOfType(Underlying);
13408 return SemaRef.BuildDecltypeType(E, Loc);
13415 return SemaRef.BuildUnaryTransformType(BaseType, UKind, Loc);
13423 return SemaRef.CheckTemplateIdType(Template, TemplateNameLoc, TemplateArgs);
13429 return SemaRef.BuildAtomicType(ValueType, KWLoc);
13436 return isReadPipe ? SemaRef.BuildReadPipeType(ValueType, KWLoc)
13437 : SemaRef.BuildWritePipeType(ValueType, KWLoc);
13445 return SemaRef.Context.getQualifiedTemplateName(SS.getScopeRep(), TemplateKW,
13503 return SemaRef.checkPseudoObjectAssignment(/*Scope=*/nullptr, OpLoc, Opc,
13505 ExprResult Result = SemaRef.CheckPlaceholderExpr(First);
13512 ExprResult Result = SemaRef.CheckPlaceholderExpr(Second);
13526 return SemaRef.BuildOverloadedArrowExpr(nullptr, First, OpLoc);
13545 = SemaRef.CreateBuiltinBinOp(OpLoc, Opc, First, Second);
13582 return SemaRef.CreateOverloadedUnaryOp(OpLoc, Opc, Functions, First,
13601 return SemaRef.CreateOverloadedArraySubscriptExpr(LBrace, RBrace,
13607 ExprResult Result = SemaRef.CreateOverloadedBinOp(
13632 return SemaRef.BuildPseudoDestructorExpr(
13638 DeclarationName Name(SemaRef.Context.DeclarationNames.getCXXDestructorName(
13639 SemaRef.Context.getCanonicalType(DestroyedType->getType())));
13652 SS.Extend(SemaRef.Context, SourceLocation(), ScopeType->getTypeLoc(),