Home | History | Annotate | Download | only in Sema

Lines Matching refs:Init

1180         if (const Expr *Init = VD->getInit()) {
1182 dyn_cast<CXXConstructExpr>(Init);
5085 else if (const char *Init = getFixItZeroInitializerForType(T))
5087 << FixItHint::CreateReplacement(ParenRange, Init);
6004 bool Sema::CheckForConstantInitializer(Expr *Init, QualType DclT) {
6013 if (Init->isConstantInitializer(Context, false))
6015 Diag(Init->getExprLoc(), diag::err_init_element_not_constant)
6016 << Init->getSourceRange();
6111 /// AddInitializerToDecl - Adds the initializer Init to the
6114 void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
6126 if ((IL = dyn_cast<IntegerLiteral>(Init)) && IL->getValue() == 0 &&
6128 CheckPureMethod(Method, Init->getSourceRange());
6131 << Method->getDeclName() << Init->getSourceRange();
6139 assert(!isa<FieldDecl>(RealDecl) && "field init shouldn't get here");
6149 CheckSelfReference(RealDecl, Init);
6151 ParenListExpr *CXXDirectInit = dyn_cast<ParenListExpr>(Init);
6155 Expr *DeduceInit = Init;
6261 if (DiagnoseUnexpandedParameterPack(Init, UPPC_Initializer)) {
6282 if (Init->getType() == Context.UnknownAnyTy && isa<ObjCMessageExpr>(Init)) {
6283 ExprResult Result = forceUnknownAnyToType(Init, Context.getObjCIdType());
6288 Init = Result.take();
6297 Init->getLocStart(),
6298 Init->getLocEnd())
6302 Init->getLocStart());
6304 Expr **Args = &Init;
6319 Init = Result.takeAs<Expr>();
6330 CheckImplicitConversions(Init, VDecl->getLocation());
6333 checkUnsafeAssigns(VDecl->getLocation(), VDecl->getType(), Init);
6335 Init = MaybeCreateExprWithCleanups(Init);
6337 VDecl->setInit(Init);
6345 CheckForConstantInitializer(Init, DclT);
6380 << Init->getSourceRange();
6391 else if (Init->isValueDependent())
6393 else if (Init->isIntegerConstantExpr(Context, &Loc))
6395 else if (Init->isEvaluatable(Context)) {
6399 << Init->getSourceRange();
6404 << Init->getSourceRange();
6411 << DclT << Init->getSourceRange();
6417 if (!Init->isValueDependent() && !Init->isEvaluatable(Context)) {
6418 Diag(Init->getExprLoc(), diag::err_in_class_initializer_non_constant)
6419 << Init->getSourceRange();
6426 << DclT << Init->getSourceRange()
6432 << DclT << Init->getSourceRange();
6443 CheckForConstantInitializer(Init, DclT);
6461 assert(DirectInit && "Call-style initializer must be direct init.");
6675 // C++03 [dcl.init]p9:
6686 // C++0x [dcl.init]p11:
6694 ExprResult Init = InitSeq.Perform(*this, Entity, Kind,
6696 if (Init.isInvalid())
6698 else if (Init.get()) {
6699 Var->setInit(MaybeCreateExprWithCleanups(Init.get()));
6794 Expr *init = result.takeAs<Expr>();
6795 Context.setBlockVarCopyInits(var, init);
6800 Expr *Init = var->getInit();
6803 if (!var->getDeclContext()->isDependentContext() && Init) {
6808 !Init->isConstantInitializer(Context, baseType->isReferenceType()))
6810 << Init->getSourceRange();
6824 << var << Init->getSourceRange();