Home | History | Annotate | Download | only in Sema

Lines Matching refs:SemaRef

679 static bool CheckConstexprParameterTypes(Sema &SemaRef,
688 SemaRef.RequireLiteralType(ParamLoc, *i,
776 static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
802 SemaRef.Diag(TL.getBeginLoc(), diag::err_constexpr_vla)
816 SemaRef.Diag(DS->getLocStart(), diag::err_constexpr_type_definition)
823 SemaRef.Diag(DS->getLocStart(), diag::err_constexpr_var_declaration)
828 SemaRef.Diag(DS->getLocStart(), diag::err_constexpr_body_invalid_stmt)
845 static void CheckConstexprCtorInitializer(Sema &SemaRef,
859 SemaRef.Diag(Dcl->getLocation(), diag::err_constexpr_ctor_missing_init);
862 SemaRef.Diag(Field->getLocation(), diag::note_constexpr_ctor_missing_init);
870 CheckConstexprCtorInitializer(SemaRef, Dcl, *I, Inits, Diagnosed);
2028 static bool FindBaseInitializer(Sema &SemaRef,
2038 if (SemaRef.Context.hasSameUnqualifiedType(BaseType, Base->getType())) {
2055 if (SemaRef.IsDerivedFrom(SemaRef.Context.getTypeDeclType(ClassDecl),
2645 static Expr *CastForMoving(Sema &SemaRef, Expr *E, QualType T = QualType()) {
2647 QualType TargetType = SemaRef.BuildReferenceType(
2650 TypeSourceInfo *TargetLoc = SemaRef.Context.getTrivialTypeSourceInfo(
2653 return SemaRef.BuildCXXNamedCast(ExprLoc, tok::kw_static_cast, TargetLoc, E,
2668 BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
2674 = InitializedEntity::InitializeBase(SemaRef.Context, BaseSpec,
2693 SemaRef.BuildDeclRefExpr(PD, PD->getType().getNonReferenceType(),
2697 Args.push_back(CastForMoving(SemaRef, ArgExpr.take(), PD->getType()));
2702 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind,
2704 BaseInit = InitSeq.Perform(SemaRef, InitEntity, InitKind, Args);
2712 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, 0, 0);
2713 BaseInit = InitSeq.Perform(SemaRef, InitEntity, InitKind, MultiExprArg());
2724 DeclRefExpr::Create(SemaRef.Context, NestedNameSpecifierLoc(),
2729 SemaRef.MarkDeclRefReferenced(cast<DeclRefExpr>(CopyCtorArg));
2733 SemaRef.Context.getQualifiedType(BaseSpec->getType().getUnqualifiedType(),
2737 CopyCtorArg = CastForMoving(SemaRef, CopyCtorArg);
2742 CopyCtorArg = SemaRef.ImpCastExprToType(CopyCtorArg, ArgTy,
2750 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind,
2752 BaseInit = InitSeq.Perform(SemaRef, InitEntity, InitKind,
2758 BaseInit = SemaRef.MaybeCreateExprWithCleanups(BaseInit);
2763 new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context,
2764 SemaRef.Context.getTrivialTypeSourceInfo(BaseSpec->getType(),
2781 BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
2796 if (Field->isBitField() && Field->getBitWidthValue(SemaRef.Context) == 0)
2800 DeclRefExpr::Create(SemaRef.Context, NestedNameSpecifierLoc(),
2804 SemaRef.MarkDeclRefReferenced(cast<DeclRefExpr>(MemberExprBase));
2807 MemberExprBase = CastForMoving(SemaRef, MemberExprBase);
2812 LookupResult MemberLookup(SemaRef, Field->getDeclName(), Loc,
2818 = SemaRef.BuildMemberReferenceExpr(MemberExprBase,
2833 CtorArg = CastForMoving(SemaRef, CtorArg.take());
2842 QualType SizeType = SemaRef.Context.getSizeType();
2845 = SemaRef.Context.getAsConstantArrayType(BaseType)) {
2853 IterationVarName = &SemaRef.Context.Idents.get(OS.str());
2856 = VarDecl::Create(SemaRef.Context, SemaRef.CurContext, Loc, Loc,
2858 SemaRef.Context.getTrivialTypeSourceInfo(SizeType, Loc),
2864 = SemaRef.BuildDeclRefExpr(IterationVar, SizeType, VK_LValue, Loc);
2867 IterationVarRef = SemaRef.DefaultLvalueConversion(IterationVarRef.take());
2872 CtorArg = SemaRef.CreateBuiltinArraySubscriptExpr(CtorArg.take(), Loc,
2883 CtorArg = CastForMoving(SemaRef, CtorArg.take());
2895 Entities.push_back(InitializedEntity::InitializeElement(SemaRef.Context,
2904 InitializationSequence InitSeq(SemaRef, Entities.back(), InitKind,
2908 = InitSeq.Perform(SemaRef, Entities.back(), InitKind,
2910 MemberInit = SemaRef.MaybeCreateExprWithCleanups(MemberInit);
2918 = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Indirect,
2923 CXXMemberInit = CXXCtorInitializer::Create(SemaRef.Context, Field, Loc,
2935 SemaRef.Context.getBaseElementType(Field->getType());
2944 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, 0, 0);
2946 InitSeq.Perform(SemaRef, InitEntity, InitKind, MultiExprArg());
2948 MemberInit = SemaRef.MaybeCreateExprWithCleanups(MemberInit);
2953 CXXMemberInit = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context,
2959 CXXMemberInit = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context,
2968 SemaRef.Diag(Constructor->getLocation(),
2971 << SemaRef.Context.getTagDeclType(Constructor->getParent())
2973 SemaRef.Diag(Field->getLocation(), diag::note_declared_at);
2978 SemaRef.Diag(Constructor->getLocation(),
2981 << SemaRef.Context.getTagDeclType(Constructor->getParent())
2983 SemaRef.Diag(Field->getLocation(), diag::note_declared_at);
2988 if (SemaRef.getLangOpts().ObjCAutoRefCount &&
2995 = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Field,
2997 new (SemaRef.Context) ImplicitValueInitExpr(Field->getType()),
3084 static bool CollectFieldInitializer(Sema &SemaRef, BaseAndFieldInfo &Info,
3098 Init = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Indirect,
3103 Init = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Field,
3117 if (isIncompleteOrZeroLengthArrayType(SemaRef.Context, Field->getType()))
3335 Sema &SemaRef, const CXXConstructorDecl *Constructor,
3345 if (SemaRef.Diags.getDiagnosticLevel(diag::warn_initializer_out_of_order,
3366 IdealInitKeys.push_back(GetKeyForBase(SemaRef.Context, VBase->getType()));
3373 IdealInitKeys.push_back(GetKeyForBase(SemaRef.Context, Base->getType()));
3391 void *InitKey = GetKeyForMember(SemaRef.Context, Init);
3404 SemaRef.Diag(PrevInit->getSourceLocation(),
9770 CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef,
9774 return SemaRef.Diag(FnDecl->getLocation(),
9781 return SemaRef.Diag(FnDecl->getLocation(),
9790 CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
9800 return SemaRef.Diag(FnDecl->getLocation(),
9805 if (SemaRef.Context.getCanonicalType(ResultType) != ExpectedResultType)
9806 return SemaRef.Diag(FnDecl->getLocation(),
9812 return SemaRef.Diag(FnDecl->getLocation(),
9818 return SemaRef.Diag(FnDecl->getLocation(),
9825 return SemaRef.Diag(FnDecl->getLocation(), DependentParamTypeDiag)
9829 if (SemaRef.Context.getCanonicalType(FirstParamType).getUnqualifiedType() !=
9831 return SemaRef.Diag(FnDecl->getLocation(), InvalidParamTypeDiag)
9838 CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {
9843 if (CheckOperatorNewDeleteDeclarationScope(SemaRef, FnDecl))
9847 SemaRef.Context.getCanonicalType(SemaRef.Context.getSizeType());
9852 if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidPtrTy,
9861 return SemaRef.Diag(FnDecl->getLocation(),
9869 CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {
9874 if (CheckOperatorNewDeleteDeclarationScope(SemaRef, FnDecl))
9880 if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidTy,
9881 SemaRef.Context.VoidPtrTy,