Lines Matching defs:SemaRef
113 Sema &SemaRef;
122 TreeTransform(Sema &SemaRef) : SemaRef(SemaRef) { }
137 Sema &getSema() const { return SemaRef; }
522 return SemaRef.Context.getTrivialTypeSourceInfo(T,
728 return SemaRef.Context.getTypeDeclType(Typedef);
733 return SemaRef.Context.getTypeDeclType(Record);
738 return SemaRef.Context.getTypeDeclType(Enum);
767 return SemaRef.Context.getAutoType(Deduced);
784 return SemaRef.Context.getParenType(InnerType);
796 return SemaRef.Context.getElaboratedType(Keyword,
824 return SemaRef.Context.getDependentTemplateSpecializationType(Keyword,
838 return SemaRef.Context.getElaboratedType(Keyword,
858 if (!SemaRef.computeDeclContext(SS))
859 return SemaRef.Context.getDependentNameType(Keyword,
865 return SemaRef.CheckTypenameType(Keyword, KeywordLoc, QualifierLoc,
873 LookupResult Result(SemaRef, Id, IdLoc, Sema::LookupTagName);
874 DeclContext *DC = SemaRef.computeDeclContext(SS, false);
878 if (SemaRef.RequireCompleteDeclContext(SS, DC))
882 SemaRef.LookupQualifiedName(Result, DC);
904 LookupResult Result(SemaRef, Id, IdLoc, Sema::LookupTagName);
905 SemaRef.LookupQualifiedName(Result, DC);
915 SemaRef.Diag(IdLoc, diag::err_tag_reference_non_tag) << Kind;
916 SemaRef.Diag(SomeDecl->getLocation(), diag::note_declared_at);
921 SemaRef.Diag(IdLoc, diag::err_not_tag_in_scope)
928 if (!SemaRef.isAcceptableTagRedeclaration(Tag, Kind, /*isDefinition*/false,
930 SemaRef.Diag(KeywordLoc, diag::err_use_with_wrong_tag) << Id;
931 SemaRef.Diag(Tag->getLocation(), diag::note_previous_use);
936 QualType T = SemaRef.Context.getTypeDeclType(Tag);
937 return SemaRef.Context.getElaboratedType(Keyword,
1058 return SemaRef.ActOnLabelStmt(IdentLoc, L, ColonLoc, SubStmt);
1068 return SemaRef.ActOnAttributedStmt(AttrLoc, Attrs, SubStmt);
1642 = SemaRef.ActOnInitList(LBraceLoc, Inits, RBraceLoc);
1663 = SemaRef.ActOnDesignatedInitializer(Desig, EqualOrColonLoc, GNUSyntax,
1677 return SemaRef.Owned(new (SemaRef.Context) ImplicitValueInitExpr(T));
1729 return SemaRef.ActOnChooseExpr(BuiltinLoc,
2182 return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType,
2205 return SemaRef.BuildMemberReferenceExpr(BaseE, BaseType,
2217 return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd());
2226 return new (SemaRef.Context) SizeOfPackExpr(SemaRef.Context.getSizeType(),
2230 return new (SemaRef.Context) SizeOfPackExpr(SemaRef.Context.getSizeType(),
2278 return SemaRef.Owned(SemaRef.BuildObjCEncodeExpression(AtLoc, EncodeTypeInfo,
2290 return SemaRef.BuildClassMessage(ReceiverTypeInfo,
2305 return SemaRef.BuildInstanceMessage(Receiver,
2423 = SemaRef.Context.Idents.get("__builtin_shufflevector");
2424 TranslationUnitDecl *TUDecl = SemaRef.Context.getTranslationUnitDecl();
2430 Expr *Callee = new (SemaRef.Context) DeclRefExpr(Builtin, false,
2431 SemaRef.Context.BuiltinFnTy,
2433 QualType CalleePtrTy = SemaRef.Context.getPointerType(Builtin->getType());
2434 Callee = SemaRef.ImpCastExprToType(Callee, CalleePtrTy,
2438 ExprResult TheCall = SemaRef.Owned(
2439 new (SemaRef.Context) CallExpr(SemaRef.Context, Callee, SubExprs,
2445 return SemaRef
2518 return new (SemaRef.Context) AtomicExpr(BuiltinLoc, SubExprs, RetTy, Op,
2537 return SemaRef.Owned(S);
2563 return SemaRef.Owned(S);
2570 return SemaRef.Owned(E);
2581 return SemaRef.Owned(E);
2590 return SemaRef.Owned(Init);
2757 if (SemaRef.BuildCXXNestedNameSpecifier(/*Scope=*/0,
2773 SS.Extend(SemaRef.Context, NS, Q.getLocalBeginLoc(), Q.getLocalEndLoc());
2782 SS.Extend(SemaRef.Context, Alias, Q.getLocalBeginLoc(),
2790 SS.MakeGlobal(SemaRef.Context, Q.getBeginLoc());
2802 (SemaRef.getLangOpts().CPlusPlus11 &&
2807 SemaRef.Diag(TL.getBeginLoc(),
2809 SS.Extend(SemaRef.Context, /*FIXME:*/SourceLocation(), TL,
2817 SemaRef.Diag(TL.getBeginLoc(), diag::err_nested_name_spec_non_tag)
2841 return SS.getWithLocInContext(SemaRef.Context);
2871 NewCanTy = SemaRef.Context.getCanonicalType(NewTInfo->getType());
2879 NewCanTy = SemaRef.Context.getCanonicalType(NewT);
2883 = SemaRef.Context.DeclarationNames.getCXXSpecialName(Name.getNameKind(),
2991 SemaRef.Context.getTrivialTypeSourceInfo(Arg.getAsType(), Loc));
3000 Builder.MakeTrivial(SemaRef.Context, DTN->getQualifier(), Loc);
3002 Builder.MakeTrivial(SemaRef.Context, QTN->getQualifier(), Loc);
3006 Builder.getWithLocInContext(SemaRef.Context),
3010 Builder.getWithLocInContext(SemaRef.Context),
3087 E = SemaRef.ActOnConstantExpression(E);
3316 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
3371 = SemaRef.Context.getQualifiedType(Replacement.getUnqualifiedType(),
3373 Result = SemaRef.Context.getSubstTemplateTypeParmType(
3382 Deduced = SemaRef.Context.getQualifiedType(Deduced.getUnqualifiedType(),
3384 Result = SemaRef.Context.getAutoType(Deduced);
3390 SemaRef.Diag(R.getBegin(), diag::err_attr_objc_ownership_redundant)
3398 Result = SemaRef.BuildQualifiedType(Result, T.getBeginLoc(), Quals);
3457 return TLB.getTypeSourceInfo(SemaRef.Context, Result)->getTypeLoc();
3514 return TLB.getTypeSourceInfo(SemaRef.Context, Result);
3555 Result = SemaRef.Context.getObjCObjectPointerType(PointeeType);
3731 EnterExpressionEvaluationContext Unevaluated(SemaRef,
3734 Size = SemaRef.ActOnConstantExpression(Size).take();
3816 EnterExpressionEvaluationContext Unevaluated(SemaRef,
3825 sizeResult = SemaRef.ActOnConstantExpression(sizeResult);
3866 EnterExpressionEvaluationContext Unevaluated(SemaRef,
3870 Size = SemaRef.ActOnConstantExpression(Size);
3977 NewDI = TLB.getTypeSourceInfo(SemaRef.Context, Result);
3986 ParmVarDecl *newParm = ParmVarDecl::Create(SemaRef.Context,
4024 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded);
4238 Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext, ThisTypeQuals);
4356 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
4363 E = SemaRef.HandleExprEvaluationContextForTypeof(E.get());
4414 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated, 0,
4544 QualType T = SemaRef.Context.getTypeDeclType(cast<TypeDecl>(D));
4571 Replacement = SemaRef.Context.getCanonicalType(Replacement);
4573 = SemaRef.Context.getSubstTemplateTypeParmType(T->getReplacedParameter(),
4780 NewTL.setQualifierLoc(SS.getWithLocInContext(SemaRef.Context));
4839 SemaRef.Diag(TL.getNamedTypeLoc().getBeginLoc(),
4841 SemaRef.Diag(TAT->getLocation(), diag::note_declared_at);
4883 result = SemaRef.Context.getAttributedType(oldType->getAttrKind(),
5098 return SemaRef.Owned(S);
5139 return SemaRef.Owned(S);
5152 EnterExpressionEvaluationContext Unevaluated(SemaRef,
5157 LHS = SemaRef.ActOnConstantExpression(LHS);
5163 RHS = SemaRef.ActOnConstantExpression(RHS);
5286 return SemaRef.Owned(S);
5396 return SemaRef.Owned(S);
5462 return SemaRef.Owned(S);
5488 Target = SemaRef.MaybeCreateExprWithCleanups(Target.take());
5492 return SemaRef.Owned(S);
5501 return SemaRef.Owned(S);
5507 return SemaRef.Owned(S);
5541 return SemaRef.Owned(S);
5597 return SemaRef.Owned(S);
5604 AsmString = SemaRef.Owned(S->getAsmString());
5655 return SemaRef.Owned(S);
5709 return SemaRef.Owned(S);
5756 return SemaRef.Owned(S);
5775 return SemaRef.Owned(S);
5806 return SemaRef.Owned(S);
5845 return SemaRef.Owned(S);
5877 return SemaRef.Owned(S);
5898 Cond = SemaRef.CheckBooleanCondition(Cond.take(), S->getColonLoc());
5902 Cond = SemaRef.MaybeCreateExprWithCleanups(Cond.take());
5908 Inc = SemaRef.MaybeCreateExprWithCleanups(Inc.take());
5941 return SemaRef.Owned(S);
6025 return SemaRef.Owned(S);
6072 return SemaRef.Owned(E);
6107 SemaRef.MarkDeclRefReferenced(E);
6109 return SemaRef.Owned(E);
6130 return SemaRef.Owned(E);
6136 return SemaRef.Owned(E);
6142 return SemaRef.Owned(E);
6148 return SemaRef.Owned(E);
6154 return SemaRef.Owned(E);
6160 return SemaRef.MaybeBindToTemporary(E);
6207 return SemaRef.Owned(E);
6233 return SemaRef.Owned(E);
6298 return SemaRef.Owned(E);
6311 return SemaRef.Owned(E);
6323 Expr *newSyntacticForm = SemaRef.recreateSyntacticForm(E);
6331 result = SemaRef.checkPseudoObjectRValue(result.take());
6348 return SemaRef.Owned(E);
6358 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
6366 return SemaRef.Owned(E);
6389 return SemaRef.Owned(E);
6415 return SemaRef.MaybeBindToTemporary(E);
6467 SemaRef.MarkMemberReferenced(E);
6469 return SemaRef.Owned(E);
6484 = SemaRef.PP.getLocForEndOfToken(E->getBase()->getSourceRange().getEnd());
6518 return SemaRef.Owned(E);
6551 return SemaRef.Owned(e);
6579 return SemaRef.Owned(E);
6611 return SemaRef.Owned(E);
6634 return SemaRef.MaybeBindToTemporary(E);
6654 return SemaRef.Owned(E);
6658 = SemaRef.PP.getLocForEndOfToken(E->getBase()->getLocEnd());
6675 return SemaRef.Owned(E);
6742 return SemaRef.Owned(E);
6763 return SemaRef.Owned(E);
6782 return SemaRef.Owned(E);
6822 SemaRef.ActOnStartStmtExpr();
6826 SemaRef.ActOnStmtExprError();
6833 SemaRef.ActOnStmtExprError();
6834 return SemaRef.MaybeBindToTemporary(E);
6861 return SemaRef.Owned(E);
6871 return SemaRef.Owned(E);
6895 = SemaRef.PP.getLocForEndOfToken(
6948 return SemaRef.MaybeBindToTemporary(E);
6989 return SemaRef.MaybeBindToTemporary(E);
7014 return SemaRef.Owned(E);
7067 return SemaRef.Owned(E);
7086 return SemaRef.Owned(E);
7098 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated,
7107 return SemaRef.Owned(E);
7126 return SemaRef.Owned(E);
7134 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
7142 return SemaRef.Owned(E);
7153 return SemaRef.Owned(E);
7160 return SemaRef.Owned(E);
7174 assert(SemaRef.Context.getDiagnostics().hasErrorOccurred() &&
7182 return SemaRef.Owned(E);
7197 return SemaRef.Owned(E);
7214 return SemaRef.Owned(E);
7229 return SemaRef.Owned(E);
7295 SemaRef.MarkFunctionReferenced(E->getLocStart(), OperatorNew);
7297 SemaRef.MarkFunctionReferenced(E->getLocStart(), OperatorDelete);
7301 = SemaRef.Context.getBaseElementType(E->getAllocatedType());
7304 if (CXXDestructorDecl *Destructor = SemaRef.LookupDestructor(Record)) {
7305 SemaRef.MarkFunctionReferenced(E->getLocStart(), Destructor);
7310 return SemaRef.Owned(E);
7320 const ArrayType *ArrayT = SemaRef.Context.getAsArrayType(AllocType);
7326 = SemaRef.Owned(IntegerLiteral::Create(SemaRef.Context,
7328 SemaRef.Context.getSizeType(),
7334 ArraySize = SemaRef.Owned(DepArrayT->getSizeExpr());
7376 SemaRef.MarkFunctionReferenced(E->getLocStart(), OperatorDelete);
7379 QualType Destroyed = SemaRef.Context.getBaseElementType(
7383 SemaRef.MarkFunctionReferenced(E->getLocStart(),
7384 SemaRef.LookupDestructor(Record));
7388 return SemaRef.Owned(E);
7407 Base = SemaRef.ActOnStartCXXMemberReference(0, Base.get(),
7441 ParsedType T = SemaRef.getDestructorName(E->getTildeLoc(),
7451 = SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.GetTypeFromParser(T),
7478 LookupResult R(SemaRef, Old->getName(), Old->getNameLoc(),
7563 return SemaRef.Owned(E);
7584 return SemaRef.Owned(E);
7610 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
7622 SemaRef.collectUnexpandedParameterPacks(PatternTL, Unexpanded);
7661 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
7668 Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(SemaRef, I);
7675 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
7702 Args.push_back(TLB.getTypeSourceInfo(SemaRef.Context, To));
7706 return SemaRef.Owned(E);
7723 return SemaRef.Owned(E);
7727 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
7733 return SemaRef.Owned(E);
7748 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
7754 return SemaRef.Owned(E);
7794 return SemaRef.Owned(E);
7853 SemaRef.MarkFunctionReferenced(E->getLocStart(), Constructor);
7854 return SemaRef.Owned(E);
7915 SemaRef.MarkFunctionReferenced(E->getLocStart(), Constructor);
7916 return SemaRef.MaybeBindToTemporary(E);
8096 return SemaRef.Owned(E);
8123 Base = SemaRef.ActOnStartCXXMemberReference(0, Base.get(),
8176 return SemaRef.Owned(E);
8235 LookupResult R(SemaRef, Old->getMemberNameInfo(),
8312 EnterExpressionEvaluationContext Unevaluated(SemaRef, Sema::Unevaluated);
8318 return SemaRef.Owned(E);
8331 return SemaRef.Owned(E);
8343 return SemaRef.Owned(E);
8359 return SemaRef.Owned(E);
8382 return SemaRef.Owned(E);
8390 return SemaRef.Owned(E);
8397 return SemaRef.Owned(E);
8410 return SemaRef.MaybeBindToTemporary(E);
8416 return SemaRef.Owned(E);
8428 return SemaRef.Owned(E);
8444 return SemaRef.MaybeBindToTemporary(E);
8566 return SemaRef.MaybeBindToTemporary(E);
8583 return SemaRef.Owned(E);
8599 return SemaRef.Owned(E);
8601 return SemaRef.Owned(new(SemaRef.Context)
8620 return SemaRef.Owned(E);
8622 return SemaRef.BuildObjCBridgedCast(E->getLParenLoc(), E->getBridgeKind(),
8648 return SemaRef.MaybeBindToTemporary(E);
8673 return SemaRef.MaybeBindToTemporary(E);
8690 return SemaRef.Owned(E);
8696 return SemaRef.Owned(E);
8712 return SemaRef.Owned(E);
8725 return SemaRef.Owned(E);
8737 return SemaRef.Owned(E);
8745 SemaRef.Context.PseudoObjectTy,
8767 return SemaRef.Owned(E);
8786 return SemaRef.Owned(E);
8804 return SemaRef.Owned(E);
8816 SemaRef.ActOnBlockStart(E->getCaretLocation(), /*Scope=*/0);
8817 BlockScopeInfo *blockScope = SemaRef.getCurBlock();
8872 if (!SemaRef.getDiagnostics().hasErrorOccurred()) {
8891 return SemaRef.ActOnBlockStmtExpr(E->getCaretLocation(), body.get(),
8914 return SemaRef.Owned(E);
8927 return SemaRef.BuildPointerType(PointeeType, Star,
8934 return SemaRef.BuildBlockPointerType(PointeeType, Star,
8943 return SemaRef.BuildReferenceType(ReferentType, WrittenAsLValue,
8952 return SemaRef.BuildMemberPointerType(PointeeType, ClassType,
8965 return SemaRef.BuildArrayType(ElementType, SizeMod, SizeExpr,
8970 SemaRef.Context.UnsignedCharTy, SemaRef.Context.UnsignedShortTy,
8971 SemaRef.Context.UnsignedIntTy, SemaRef.Context.UnsignedLongTy,
8972 SemaRef.Context.UnsignedLongLongTy, SemaRef.Context.UnsignedInt128Ty
8977 if (Size->getBitWidth() == SemaRef.Context.getIntWidth(Types[I])) {
8985 = IntegerLiteral::Create(SemaRef.Context, *Size, SizeType,
8987 return SemaRef.BuildArrayType(ElementType, SizeMod, ArraySize,
9042 return SemaRef.Context.getVectorType(ElementType, NumElements, VecKind);
9049 llvm::APInt numElements(SemaRef.Context.getIntWidth(SemaRef.Context.IntTy),
9052 = IntegerLiteral::Create(SemaRef.Context, numElements, SemaRef.Context.IntTy,
9054 return SemaRef.BuildExtVectorType(ElementType, VectorSize, AttributeLoc);
9062 return SemaRef.BuildExtVectorType(ElementType, SizeExpr, AttributeLoc);
9070 return SemaRef.BuildFunctionType(T, ParamTypes,
9078 return SemaRef.Context.getFunctionNoProtoType(T);
9103 return SemaRef.Context.getTypeDeclType(Ty);
9109 return SemaRef.BuildTypeofExprType(E, Loc);
9114 return SemaRef.Context.getTypeOfType(Underlying);
9120 return SemaRef.BuildDecltypeType(E, Loc);
9127 return SemaRef.BuildUnaryTransformType(BaseType, UKind, Loc);
9135 return SemaRef.CheckTemplateIdType(Template, TemplateNameLoc, TemplateArgs);
9141 return SemaRef.BuildAtomicType(ValueType, KWLoc);
9149 return SemaRef.Context.getQualifiedTemplateName(SS.getScopeRep(), TemplateKW,
9211 return SemaRef.BuildOverloadedArrowExpr(0, First, OpLoc);
9228 = SemaRef.CreateBuiltinBinOp(OpLoc, Opc, First, Second);
9263 return SemaRef.CreateOverloadedUnaryOp(OpLoc, Opc, Functions, First);
9281 return SemaRef.CreateOverloadedArraySubscriptExpr(LBrace, RBrace,
9288 = SemaRef.CreateOverloadedBinOp(OpLoc, Opc, Functions, Args[0], Args[1]);
9312 return SemaRef.BuildPseudoDestructorExpr(Base, OperatorLoc,
9320 DeclarationName Name(SemaRef.Context.DeclarationNames.getCXXDestructorName(
9321 SemaRef.Context.getCanonicalType(DestroyedType->getType())));
9328 SS.Extend(SemaRef.Context, SourceLocation(),