Home | History | Annotate | Download | only in Sema

Lines Matching refs:SemaRef

764 static bool CheckConstexprParameterTypes(Sema &SemaRef,
774 SemaRef.RequireLiteralType(ParamLoc, *i,
863 static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
889 SemaRef.Diag(TL.getBeginLoc(), diag::err_constexpr_vla)
901 SemaRef.Diag(DS->getLocStart(),
902 SemaRef.getLangOpts().CPlusPlus14
922 SemaRef.Diag(VD->getLocation(),
929 SemaRef.RequireLiteralType(
936 SemaRef.Diag(VD->getLocation(),
942 SemaRef.Diag(VD->getLocation(),
943 SemaRef.getLangOpts().CPlusPlus14
959 SemaRef.Diag(DS->getLocStart(), diag::err_constexpr_body_invalid_stmt)
976 static void CheckConstexprCtorInitializer(Sema &SemaRef,
998 SemaRef.Diag(Dcl->getLocation(), diag::err_constexpr_ctor_missing_init);
1001 SemaRef.Diag(Field->getLocation(), diag::note_constexpr_ctor_missing_init);
1008 CheckConstexprCtorInitializer(SemaRef, Dcl, I, Inits, Diagnosed);
1015 CheckConstexprFunctionStmt(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *S,
1030 if (!CheckConstexprDeclStmt(SemaRef, Dcl, cast<DeclStmt>(S), Cxx1yLoc))
1053 if (!CheckConstexprFunctionStmt(SemaRef, Dcl, BodyIt, ReturnStmts,
1071 if (!CheckConstexprFunctionStmt(SemaRef, Dcl, If->getThen(), ReturnStmts,
1075 !CheckConstexprFunctionStmt(SemaRef, Dcl, If->getElse(), ReturnStmts,
1088 if (!SemaRef.getLangOpts().CPlusPlus14)
1094 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts,
1109 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts,
1124 SemaRef.Diag(S->getLocStart(), diag::err_constexpr_body_invalid_stmt)
2613 Sema &SemaRef, const CXXConstructorDecl *Constructor) {
2615 if (SemaRef.getDiagnostics().isIgnored(diag::warn_field_is_uninit,
2647 UninitializedFieldVisitor UninitializedChecker(SemaRef,
2743 static bool FindBaseInitializer(Sema &SemaRef,
2751 if (SemaRef.Context.hasSameUnqualifiedType(BaseType, Base.getType())) {
2768 if (SemaRef.IsDerivedFrom(ClassDecl->getLocation(),
2769 SemaRef.Context.getTypeDeclType(ClassDecl),
3321 static Expr *CastForMoving(Sema &SemaRef, Expr *E, QualType T = QualType()) {
3323 QualType TargetType = SemaRef.BuildReferenceType(
3326 TypeSourceInfo *TargetLoc = SemaRef.Context.getTrivialTypeSourceInfo(
3329 return SemaRef.BuildCXXNamedCast(ExprLoc, tok::kw_static_cast, TargetLoc, E,
3344 BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
3350 = InitializedEntity::InitializeBase(SemaRef.Context, BaseSpec,
3369 SemaRef.BuildDeclRefExpr(PD, PD->getType().getNonReferenceType(),
3373 Args.push_back(CastForMoving(SemaRef, ArgExpr.get(), PD->getType()));
3378 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, Args);
3379 BaseInit = InitSeq.Perform(SemaRef, InitEntity, InitKind, Args);
3387 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, None);
3388 BaseInit = InitSeq.Perform(SemaRef, InitEntity, InitKind, None);
3399 DeclRefExpr::Create(SemaRef.Context, NestedNameSpecifierLoc(),
3404 SemaRef.MarkDeclRefReferenced(cast<DeclRefExpr>(CopyCtorArg));
3408 SemaRef.Context.getQualifiedType(BaseSpec->getType().getUnqualifiedType(),
3412 CopyCtorArg = CastForMoving(SemaRef, CopyCtorArg);
3417 CopyCtorArg = SemaRef.ImpCastExprToType(CopyCtorArg, ArgTy,
3425 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, CopyCtorArg);
3426 BaseInit = InitSeq.Perform(SemaRef, InitEntity, InitKind, CopyCtorArg);
3431 BaseInit = SemaRef.MaybeCreateExprWithCleanups(BaseInit);
3436 new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context,
3437 SemaRef.Context.getTrivialTypeSourceInfo(BaseSpec->getType(),
3454 BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
3469 if (Field->isBitField() && Field->getBitWidthValue(SemaRef.Context) == 0)
3473 DeclRefExpr::Create(SemaRef.Context, NestedNameSpecifierLoc(),
3477 SemaRef.MarkDeclRefReferenced(cast<DeclRefExpr>(MemberExprBase));
3480 MemberExprBase = CastForMoving(SemaRef, MemberExprBase);
3485 LookupResult MemberLookup(SemaRef, Field->getDeclName(), Loc,
3491 = SemaRef.BuildMemberReferenceExpr(MemberExprBase,
3507 CtorArg = CastForMoving(SemaRef, CtorArg.get());
3516 QualType SizeType = SemaRef.Context.getSizeType();
3519 = SemaRef.Context.getAsConstantArrayType(BaseType)) {
3527 IterationVarName = &SemaRef.Context.Idents.get(OS.str());
3530 = VarDecl::Create(SemaRef.Context, SemaRef.CurContext, Loc, Loc,
3532 SemaRef.Context.getTrivialTypeSourceInfo(SizeType, Loc),
3538 = SemaRef.BuildDeclRefExpr(IterationVar, SizeType, VK_LValue, Loc);
3541 IterationVarRef = SemaRef.DefaultLvalueConversion(IterationVarRef.get());
3546 CtorArg = SemaRef.CreateBuiltinArraySubscriptExpr(CtorArg.get(), Loc,
3557 CtorArg = CastForMoving(SemaRef, CtorArg.get());
3569 Entities.push_back(InitializedEntity::InitializeElement(SemaRef.Context,
3578 InitializationSequence InitSeq(SemaRef, Entities.back(), InitKind,
3582 = InitSeq.Perform(SemaRef, Entities.back(), InitKind,
3584 MemberInit = SemaRef.MaybeCreateExprWithCleanups(MemberInit);
3592 = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Indirect,
3597 CXXMemberInit = CXXCtorInitializer::Create(SemaRef.Context, Field, Loc,
3609 SemaRef.Context.getBaseElementType(Field->getType());
3618 InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, None);
3620 InitSeq.Perform(SemaRef, InitEntity, InitKind, None);
3622 MemberInit = SemaRef.MaybeCreateExprWithCleanups(MemberInit);
3627 CXXMemberInit = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context,
3633 CXXMemberInit = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context,
3642 SemaRef.Diag(Constructor->getLocation(),
3645 << SemaRef.Context.getTagDeclType(Constructor->getParent())
3647 SemaRef.Diag(Field->getLocation(), diag::note_declared_at);
3652 SemaRef.Diag(Constructor->getLocation(),
3655 << SemaRef.Context.getTagDeclType(Constructor->getParent())
3657 SemaRef.Diag(Field->getLocation(), diag::note_declared_at);
3662 if (SemaRef.getLangOpts().ObjCAutoRefCount &&
3669 = new (SemaRef.Context) CXXCtorInitializer(SemaRef.Context, Field,
3671 new (SemaRef.Context) ImplicitValueInitExpr(Field->getType()),
3787 static bool CollectFieldInitializer(Sema &SemaRef, BaseAndFieldInfo &Info,
3815 SemaRef.BuildCXXDefaultInitExpr(Info.Ctor->getLocation(), Field);
3820 Init = new (SemaRef.Context)
3821 CXXCtorInitializer(SemaRef.Context, Indirect, SourceLocation(),
3824 Init = new (SemaRef.Context)
3825 CXXCtorInitializer(SemaRef
3831 if (isIncompleteOrZeroLengthArrayType(SemaRef.Context, Field->getType()))
4074 Sema &SemaRef, const CXXConstructorDecl *Constructor,
4084 if (!SemaRef.Diags.isIgnored(diag::warn_initializer_out_of_order,
4102 IdealInitKeys.push_back(GetKeyForBase(SemaRef.Context, VBase.getType()));
4108 IdealInitKeys.push_back(GetKeyForBase(SemaRef.Context, Base.getType()));
4125 const void *InitKey = GetKeyForMember(SemaRef.Context, Init);
4138 SemaRef.Diag(PrevInit->getSourceLocation(),
8989 InheritingConstructorInfo(Sema &SemaRef, CXXRecordDecl *Derived)
8990 : SemaRef(SemaRef), Derived(Derived) {
9047 .getEntry(SemaRef, Ctor);
9081 SemaRef.Diag(UsingLoc, diag::warn_using_decl_constructor_ellipsis);
9082 SemaRef.Diag(Ctor->getLocation(),
9101 SemaRef.Context.getFunctionType(
9113 ASTContext &Context = SemaRef.Context;
9166 SemaRef.Diag(UsingLoc, diag::err_using_decl_constructor_conflict);
9167 SemaRef.Diag(BaseCtor->getLocation(),
9169 SemaRef.Diag(Entry.BaseCtor->getLocation(),
9171 SemaRef.Diag(Entry.DerivedCtor->getLocation(),
9177 SemaRef.SetDeclDeleted(Entry.DerivedCtor, UsingLoc);
9183 ASTContext &Context = SemaRef.Context;
9238 SemaRef.SetDeclDeleted(DerivedCtor, UsingLoc);
9243 FunctionTemplateDecl::Create(SemaRef.Context, Derived, UsingLoc, Name,
9256 Sema &SemaRef;
11479 CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef,
11483 return SemaRef.Diag(FnDecl->getLocation(),
11490 return SemaRef.Diag(FnDecl->getLocation(),
11499 CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
11509 return SemaRef.Diag(FnDecl->getLocation(),
11514 if (SemaRef.Context.getCanonicalType(ResultType) != ExpectedResultType)
11515 return SemaRef.Diag(FnDecl->getLocation(),
11521 return SemaRef.Diag(FnDecl->getLocation(),
11527 return SemaRef.Diag(FnDecl->getLocation(),
11534 return SemaRef.Diag(FnDecl->getLocation(), DependentParamTypeDiag)
11538 if (SemaRef.Context.getCanonicalType(FirstParamType).getUnqualifiedType() !=
11540 return SemaRef.Diag(FnDecl->getLocation(), InvalidParamTypeDiag)
11547 CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {
11552 if (CheckOperatorNewDeleteDeclarationScope(SemaRef, FnDecl))
11556 SemaRef.Context.getCanonicalType(SemaRef.Context.getSizeType());
11561 if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidPtrTy,
11570 return SemaRef.Diag(FnDecl->getLocation(),
11578 CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {
11583 if (CheckOperatorNewDeleteDeclarationScope(SemaRef, FnDecl))
11589 if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidTy,
11590 SemaRef.Context.VoidPtrTy,