Lines Matching defs:SemaRef
113 Sema &SemaRef;
122 TreeTransform(Sema &SemaRef) : SemaRef(SemaRef) { }
137 Sema &getSema() const { return SemaRef; }
148 bool AlwaysRebuild() { return SemaRef.ArgumentPackSubstitutionIndex != -1; }
536 return SemaRef.Context.getTrivialTypeSourceInfo(T,
765 return SemaRef.Context.getTypeDeclType(Typedef);
770 return SemaRef.Context.getTypeDeclType(Record);
775 return SemaRef.Context.getTypeDeclType(Enum);
807 return SemaRef.Context.getAutoType(Deduced, IsDecltypeAuto,
825 return SemaRef.Context.getParenType(InnerType);
837 return SemaRef.Context.getElaboratedType(Keyword,
866 return SemaRef.Context.getDependentTemplateSpecializationType(Keyword,
880 return SemaRef.Context.getElaboratedType(Keyword,
900 if (!SemaRef.computeDeclContext(SS))
901 return SemaRef.Context.getDependentNameType(Keyword,
907 return SemaRef.CheckTypenameType(Keyword, KeywordLoc, QualifierLoc,
915 LookupResult Result(SemaRef, Id, IdLoc, Sema::LookupTagName);
916 DeclContext *DC = SemaRef.computeDeclContext(SS, false);
920 if (SemaRef.RequireCompleteDeclContext(SS, DC))
924 SemaRef.LookupQualifiedName(Result, DC);
946 LookupResult Result(SemaRef, Id, IdLoc, Sema::LookupTagName);
947 SemaRef.LookupQualifiedName(Result, DC);
957 SemaRef.Diag(IdLoc, diag::err_tag_reference_non_tag) << Kind;
958 SemaRef.Diag(SomeDecl->getLocation(), diag::note_declared_at);
962 SemaRef.Diag(IdLoc, diag::err_not_tag_in_scope)
969 if (!SemaRef.isAcceptableTagRedeclaration(Tag, Kind, /*isDefinition*/false,
971 SemaRef.Diag(KeywordLoc, diag::err_use_with_wrong_tag) << Id;
972 SemaRef.Diag(Tag->getLocation(), diag::note_previous_use);
977 QualType T = SemaRef.Context.getTypeDeclType(Tag);
978 return SemaRef.Context.getElaboratedType(Keyword,
1099 return SemaRef.ActOnLabelStmt(IdentLoc, L, ColonLoc, SubStmt);
1109 return SemaRef.ActOnAttributedStmt(AttrLoc, Attrs, SubStmt);
1915 = SemaRef.ActOnInitList(LBraceLoc, Inits, RBraceLoc);
1936 = SemaRef.ActOnDesignatedInitializer(Desig, EqualOrColonLoc, GNUSyntax,
1950 return new (SemaRef.Context) ImplicitValueInitExpr(T);
2002 return SemaRef.ActOnChooseExpr(BuiltinLoc,
2438 return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType,
2461 return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType,
2473 return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd());
2482 return new (SemaRef.Context) SizeOfPackExpr(SemaRef.Context.getSizeType(),
2486 return new (SemaRef.Context) SizeOfPackExpr(SemaRef.Context.getSizeType(),
2534 return SemaRef.BuildObjCEncodeExpression(AtLoc, EncodeTypeInfo, RParenLoc);
2545 return SemaRef.BuildClassMessage(ReceiverTypeInfo,
2560 return SemaRef.BuildInstanceMessage(Receiver,
2644 = SemaRef.Context.Idents.get("__builtin_shufflevector");
2645 TranslationUnitDecl *TUDecl = SemaRef.Context.getTranslationUnitDecl();
2651 Expr *Callee = new (SemaRef.Context) DeclRefExpr(Builtin, false,
2652 SemaRef.Context.BuiltinFnTy,
2654 QualType CalleePtrTy = SemaRef.Context.getPointerType(Builtin->getType());
2655 Callee = SemaRef.ImpCastExprToType(Callee, CalleePtrTy,
2659 ExprResult TheCall = new (SemaRef.Context) CallExpr(
2660 SemaRef.Context, Callee, SubExprs, Builtin->getCallResultType(),
2664 return SemaRef.SemaBuiltinShuffleVector(cast<CallExpr>(TheCall.get()));
2671 return SemaRef.SemaConvertVectorExpr(SrcExpr, DstTInfo,
2745 return new (SemaRef.Context) AtomicExpr(BuiltinLoc, SubExprs, RetTy, Op,
3031 if (SemaRef.BuildCXXNestedNameSpecifier(/*Scope=*/nullptr,
3047 SS.Extend(SemaRef.Context, NS, Q.getLocalBeginLoc(), Q.getLocalEndLoc());
3056 SS.Extend(SemaRef.Context, Alias, Q.getLocalBeginLoc(),
3064 SS.MakeGlobal(SemaRef.Context, Q.getBeginLoc());
3076 (SemaRef.getLangOpts().CPlusPlus11 &&
3081 SemaRef.Diag(TL.getBeginLoc(),
3083 SS.Extend(SemaRef.Context, /*FIXME:*/SourceLocation(), TL,
3091 SemaRef.Diag(TL.getBeginLoc(), diag::err_nested_name_spec_non_tag)
3115 return SS.getWithLocInContext(SemaRef.Context);
3145 NewCanTy = SemaRef.Context.getCanonicalType(NewTInfo->getType());
3153 NewCanTy = SemaRef.Context.getCanonicalType(NewT);
3157 = SemaRef.Context.DeclarationNames.getCXXSpecialName(Name.getNameKind(),
3265 SemaRef.Context.getTrivialTypeSourceInfo(Arg.getAsType(), Loc));
3274 Builder.MakeTrivial(SemaRef.Context, DTN->getQualifier(), Loc);
3276 Builder.MakeTrivial(SemaRef.Context, QTN->getQualifier(), Loc);
3280 Builder.getWithLocInContext(SemaRef.Context),
3284 Builder.getWithLocInContext(SemaRef.Context),
3361 E = SemaRef.ActOnConstantExpression(E);
3590 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
3645 = SemaRef.Context.getQualifiedType(Replacement.getUnqualifiedType(),
3647 Result = SemaRef.Context.getSubstTemplateTypeParmType(
3656 Deduced = SemaRef.Context.getQualifiedType(Deduced.getUnqualifiedType(),
3658 Result = SemaRef.Context.getAutoType(Deduced, AutoTy->isDecltypeAuto(),
3665 SemaRef.Diag(R.getBegin(), diag::err_attr_objc_ownership_redundant)
3673 Result = SemaRef.BuildQualifiedType(Result, T.getBeginLoc(), Quals);
3760 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
3804 Result = SemaRef.Context.getDecayedType(OriginalType);
3824 Result = SemaRef.Context.getObjCObjectPointerType(PointeeType);
4008 EnterExpressionEvaluationContext Unevaluated(SemaRef,
4011 Size = SemaRef.ActOnConstantExpression(Size).get();
4095 EnterExpressionEvaluationContext Unevaluated(SemaRef,
4104 sizeResult = SemaRef.ActOnConstantExpression(sizeResult);
4145 EnterExpressionEvaluationContext Unevaluated(SemaRef,
4149 Size = SemaRef.ActOnConstantExpression(Size);
4256 NewDI = TLB.getTypeSourceInfo(SemaRef.Context, Result);
4265 ParmVarDecl *newParm = ParmVarDecl::Create(SemaRef.Context,
4302 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded);
4514 Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext, ThisTypeQuals);
4629 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
4636 E = SemaRef.HandleExprEvaluationContextForTypeof(E.get());
4687 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
4818 QualType T = SemaRef.Context.getTypeDeclType(cast<TypeDecl>(D));
4845 Replacement = SemaRef.Context.getCanonicalType(Replacement);
4847 = SemaRef.Context.getSubstTemplateTypeParmType(T->getReplacedParameter(),
5054 NewTL.setQualifierLoc(SS.getWithLocInContext(SemaRef.Context));
5113 SemaRef.Diag(TL.getNamedTypeLoc().getBeginLoc(),
5115 SemaRef.Diag(TAT->getLocation(), diag::note_declared_at);
5157 result = SemaRef.Context.getAttributedType(oldType->getAttrKind(),
5425 EnterExpressionEvaluationContext Unevaluated(SemaRef,
5430 LHS = SemaRef.ActOnConstantExpression(LHS);
5436 RHS = SemaRef.ActOnConstantExpression(RHS);
5763 Target = SemaRef.MaybeCreateExprWithCleanups(Target.get());
6181 Cond = SemaRef.CheckBooleanCondition(Cond.get(), S->getColonLoc());
6185 Cond = SemaRef.MaybeCreateExprWithCleanups(Cond.get());
6191 Inc = SemaRef.MaybeCreateExprWithCleanups(Inc.get());
6324 return new (SemaRef.getASTContext())
6326 SemaRef.getASTContext().PseudoObjectTy, VK_LValue,
6785 SemaRef.MarkDeclRefReferenced(E);
6839 SemaRef.MarkFunctionReferenced(E->getLocStart(), FD);
6840 return SemaRef.MaybeBindToTemporary(E);
7006 Expr *newSyntacticForm = SemaRef.recreateSyntacticForm(E);
7014 result = SemaRef.checkPseudoObjectRValue(result.get());
7041 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
7112 return SemaRef.MaybeBindToTemporary(E);
7164 SemaRef.MarkMemberReferenced(E);
7181 SemaRef.getLocForEndOfToken(E->getBase()->getSourceRange().getEnd());
7331 return SemaRef.MaybeBindToTemporary(E);
7355 SemaRef.getLocForEndOfToken(E->getBase()->getLocEnd());
7519 SemaRef.ActOnStartStmtExpr();
7523 SemaRef.ActOnStmtExprError();
7530 SemaRef.ActOnStmtExprError();
7531 return SemaRef.MaybeBindToTemporary(E);
7591 SourceLocation FakeLParenLoc = SemaRef.getLocForEndOfToken(
7644 return SemaRef.MaybeBindToTemporary(E);
7685 return SemaRef.MaybeBindToTemporary(E);
7794 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
7830 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
7995 SemaRef.MarkFunctionReferenced(E->getLocStart(), OperatorNew);
7997 SemaRef.MarkFunctionReferenced(E->getLocStart(), OperatorDelete);
8001 = SemaRef.Context.getBaseElementType(E->getAllocatedType());
8004 if (CXXDestructorDecl *Destructor = SemaRef.LookupDestructor(Record)) {
8005 SemaRef.MarkFunctionReferenced(E->getLocStart(), Destructor);
8020 const ArrayType *ArrayT = SemaRef.Context.getAsArrayType(AllocType);
8025 ArraySize = IntegerLiteral::Create(SemaRef.Context, ConsArrayT->getSize(),
8026 SemaRef.Context.getSizeType(),
8074 SemaRef.MarkFunctionReferenced(E->getLocStart(), OperatorDelete);
8077 QualType Destroyed = SemaRef.Context.getBaseElementType(
8081 SemaRef.MarkFunctionReferenced(E->getLocStart(),
8082 SemaRef.LookupDestructor(Record));
8105 Base = SemaRef.ActOnStartCXXMemberReference(nullptr, Base.get(),
8139 ParsedType T = SemaRef.getDestructorName(E->getTildeLoc(),
8149 = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.GetTypeFromParser(T),
8176 LookupResult R(SemaRef, Old->getName(), Old->getNameLoc(),
8275 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
8287 SemaRef.collectUnexpandedParameterPacks(PatternTL, Unexpanded);
8326 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
8333 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I);
8353 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
8380 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
8405 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
8426 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
8547 SemaRef.MarkFunctionReferenced(E->getLocStart(), Constructor);
8609 SemaRef.MarkFunctionReferenced(E->getLocStart(), Constructor);
8610 return SemaRef.MaybeBindToTemporary(E);
8950 Base = SemaRef.ActOnStartCXXMemberReference(nullptr, Base.get(),
9062 LookupResult R(SemaRef, Old->getMemberNameInfo(),
9138 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
9243 return SemaRef.MaybeBindToTemporary(E);
9277 return SemaRef.MaybeBindToTemporary(E);
9402 return SemaRef.MaybeBindToTemporary(E);
9453 return SemaRef.BuildObjCBridgedCast(E->getLParenLoc(), E->getBridgeKind(),
9479 return SemaRef.MaybeBindToTemporary(E);
9504 return SemaRef.MaybeBindToTemporary(E);
9576 SemaRef.Context.PseudoObjectTy,
9669 SemaRef.ActOnBlockStart(E->getCaretLocation(), /*Scope=*/nullptr);
9670 BlockScopeInfo *blockScope = SemaRef.getCurBlock();
9716 if (!SemaRef.getDiagnostics().hasErrorOccurred()) {
9734 return SemaRef.ActOnBlockStmtExpr(E->getCaretLocation(), body.get(),
9770 return SemaRef.BuildPointerType(PointeeType, Star,
9777 return SemaRef.BuildBlockPointerType(PointeeType, Star,
9786 return SemaRef.BuildReferenceType(ReferentType, WrittenAsLValue,
9795 return SemaRef.BuildMemberPointerType(PointeeType, ClassType, Sigil,
9808 return SemaRef.BuildArrayType(ElementType, SizeMod, SizeExpr,
9813 SemaRef.Context.UnsignedCharTy, SemaRef.Context.UnsignedShortTy,
9814 SemaRef.Context.UnsignedIntTy, SemaRef.Context.UnsignedLongTy,
9815 SemaRef.Context.UnsignedLongLongTy, SemaRef.Context.UnsignedInt128Ty
9820 if (Size->getBitWidth() == SemaRef.Context.getIntWidth(Types[I])) {
9828 = IntegerLiteral::Create(SemaRef.Context, *Size, SizeType,
9830 return SemaRef.BuildArrayType(ElementType, SizeMod, ArraySize,
9885 return SemaRef.Context.getVectorType(ElementType, NumElements, VecKind);
9892 llvm::APInt numElements(SemaRef.Context.getIntWidth(SemaRef.Context.IntTy),
9895 = IntegerLiteral::Create(SemaRef.Context, numElements, SemaRef.Context.IntTy,
9897 return SemaRef.BuildExtVectorType(ElementType, VectorSize, AttributeLoc);
9905 return SemaRef.BuildExtVectorType(ElementType, SizeExpr, AttributeLoc);
9913 return SemaRef.BuildFunctionType(T, ParamTypes,
9921 return SemaRef.Context.getFunctionNoProtoType(T);
9946 return SemaRef.Context.getTypeDeclType(Ty);
9952 return SemaRef.BuildTypeofExprType(E, Loc);
9957 return SemaRef.Context.getTypeOfType(Underlying);
9963 return SemaRef.BuildDecltypeType(E, Loc);
9970 return SemaRef.BuildUnaryTransformType(BaseType, UKind, Loc);
9978 return SemaRef.CheckTemplateIdType(Template, TemplateNameLoc, TemplateArgs);
9984 return SemaRef.BuildAtomicType(ValueType, KWLoc);
9992 return SemaRef.Context.getQualifiedTemplateName(SS.getScopeRep(), TemplateKW,
10048 return SemaRef.checkPseudoObjectAssignment(/*Scope=*/nullptr, OpLoc, Opc,
10050 ExprResult Result = SemaRef.CheckPlaceholderExpr(First);
10057 ExprResult Result = SemaRef.CheckPlaceholderExpr(Second);
10072 return SemaRef.BuildOverloadedArrowExpr(nullptr, First, OpLoc);
10089 = SemaRef.CreateBuiltinBinOp(OpLoc, Opc, First, Second);
10121 return SemaRef.CreateOverloadedUnaryOp(OpLoc, Opc, Functions, First);
10139 return SemaRef.CreateOverloadedArraySubscriptExpr(LBrace, RBrace,
10146 = SemaRef.CreateOverloadedBinOp(OpLoc, Opc, Functions, Args[0], Args[1]);
10170 return SemaRef.BuildPseudoDestructorExpr(Base, OperatorLoc,
10178 DeclarationName Name(SemaRef.Context.DeclarationNames.getCXXDestructorName(
10179 SemaRef.Context.getCanonicalType(DestroyedType->getType())));
10186 SS.Extend(SemaRef.Context, SourceLocation(),