Home | History | Annotate | Download | only in Sema

Lines Matching refs:Initializer

204 // Semantic checking for initializer lists.
207 /// @brief Semantic checking for initializer lists.
214 /// the initializer list one element at a time. The IList and Index
216 /// (syntactic) initializer list and the index into that initializer
217 /// list that represents the current initializer. Each routine is
222 /// initializer list and the index into that initializer list where we
225 /// structure, we will have constructed a full semantic initializer
228 /// C99 designators cause changes in the initializer list traversal,
336 // @brief Retrieves the fully-structured initializer list used for
353 // If there are fewer initializer-clauses in the list than there are
360 // shall be initialized [...] from an empty initializer list.
368 // the initializer list where possible.
465 // If there are fewer initializer-clauses in the list than there are
467 // shall be initialized from its brace-or-equal-initializer [...]
481 // If an incomplete or empty initializer-list leaves a
506 // extend the initializer list to include the constructor
508 // through the initializer list.
518 /// Recursively replaces NULL values within the given initializer list
621 // extend the initializer list to include the constructor
623 // through the initializer list.
677 /// Check whether the range of the initializer \p ParentIList from element
708 // Build a structured initializer list corresponding to this subobject.
727 // Update the structured sub-object initializer so that it's ending
728 // range corresponds with the end of the last initializer it used.
750 /// Check whether the initializer \p IList (that was written with explicit
842 // Explicitly braced initializer for complex type can be real+imaginary
946 // initializing the aggregate member with an initializer from
947 // an initializer-list. If the initializer can initialize a
973 // The initializer for a structure or union object that has
974 // automatic storage duration shall be either an initializer
1003 // subaggregate, brace elision is assumed and the initializer is
1032 // a complex number component-wise. When an explicit initializer list for
1034 // it exepcts the initializer list to contain two elements convertible to
1121 // The type was promoted, update initializer list.
1230 // The type was promoted, update initializer list.
1266 // The ability to use vector initializer lists is a GNU vector extension
1357 // initializer list. This is the only place where the structure
1358 // of the structured initializer list doesn't match exactly,
1406 // Handle this designated initializer. elementIndex will be
1423 // elements in the initializer.
1431 // hit it, stop consuming elements in the initializer list.
1444 // elements in the initializer.
1526 // Assume it was supposed to consume a single initializer.
1535 // If there's a default initializer, use it.
1568 // worthwhile to skip over the rest of the initializer, though.
1583 // Handle this designated initializer. Field will be updated to
1778 /// @brief Check the well-formedness of a C99 designated initializer.
1780 /// Determines whether the designated initializer @p DIE, which
1781 /// resides at the given @p Index within the initializer list @p
1787 /// @param IList The initializer list in which this designated
1788 /// initializer occurs.
1790 /// @param DIE The designated initializer expression.
1805 /// @param Index Index into @p IList where the designated initializer
1808 /// @param StructuredList The initializer list expression that
1831 // initializer list that the child calls see, so that we don't try
1839 // Restore the designated initializer expression in the syntactic
1840 // form of the initializer list.
1852 "Need a non-designated initializer list to start from");
1854 // Determine the structural initializer list that corresponds to the
1861 assert(StructuredList && "Expected a structured initializer list");
1900 // IndirectFieldDecl that follow for the designated initializer.
1984 // the initializer list.
1991 && "A union should never have more than one initializer!");
1993 // we're about to throw away an initializer, emit warning
2003 // remove existing initializer
2027 // Make sure that our non-designated initializer list has space
2054 // The initializer is not an initializer list.
2065 // Check GNU flexible array initializer.
2275 // Make sure that our non-designated initializer list has space
2330 // Get the structured initializer list for a subobject of type
2350 // We are creating an initializer list that initializes the
2359 // designated initializer re-initializes the whole
2380 // Pre-allocate storage for the structured initializer list.
2399 // initializer with many empty entries at the end.
2415 // Link this new initializer list into the structured initializer
2427 /// Update the initializer at index @p StructuredIndex within the
2428 /// structured initializer list to the value @p expr.
2432 // No structured initializer list to update
2438 // This initializer overwrites a previous initializer. Warn.
3157 // -- by 13.3.1.7 when passing the initializer list as a single
3158 // argument or when the initializer list has exactly one elementand
3211 "InitListSyntax must come with a single initializer list argument.");
3249 // - Initially, the candidate functions are the initializer-list
3251 // initializer list as a single argument.
3256 // If the initializer list has no elements and T has a default constructor,
3270 // - If no viable initializer-list constructor is found, overload resolution
3273 // elements of the initializer list.
3303 // initializer is ill-formed.
3321 Expr *Initializer,
3331 = S.ResolveAddressOfOverloadedFunction(Initializer,
3350 Expr *Initializer,
3380 // Reference initialization via an initializer list works thus:
3381 // If the initializer list consists of a single element that is
3384 // Otherwise, initialize a temporary with the initializer list and
3387 Expr *Initializer = InitList->getInit(0);
3388 QualType cv2T2 = Initializer->getType();
3393 if (ResolveOverloadedFunctionForReferenceBinding(S, Initializer, cv2T2, T2,
3397 SourceLocation DeclLoc = Initializer->getLocStart();
3404 TryReferenceInitializationCore(S, Entity, Kind, Initializer, cv1T1, T1,
3411 // Update the initializer if we've resolved an overloaded function.
3459 // - Otherwise, if the initializer list has no elements and T is a
3488 // - Otherwise, if the initializer list has a single element of type E
3529 Expr *Initializer,
3535 QualType cv2T2 = Initializer->getType();
3541 assert(!S.CompareReferenceRelationship(Initializer->getLocStart(),
3591 Initializer, CandidateSet,
3595 Initializer, CandidateSet,
3637 ActingDC, Initializer,
3643 Initializer, DestType, CandidateSet,
3651 SourceLocation DeclLoc = Initializer->getLocStart();
3727 Expr *Initializer,
3733 QualType cv2T2 = Initializer->getType();
3737 // If the initializer is the address of an overloaded function, try
3740 if (ResolveOverloadedFunctionForReferenceBinding(S, Initializer, cv2T2, T2,
3745 TryReferenceInitializationCore(S, Entity, Kind, Initializer, cv1T1, T1,
3766 Expr *Initializer,
3771 bool IsNonAddressableType = Initializer->refersToBitField() ||
3772 Initializer->refersToVectorElement();
3782 assert(Initializer->isGLValue());
3783 return Initializer->getValueKind();
3793 Initializer->getValueKind());
3796 return Initializer->getValueKind();
3804 Expr *Initializer,
3811 SourceLocation DeclLoc = Initializer->getLocStart();
3812 // Compute some basic properties of the types and the initializer.
3818 Expr::Classification InitCategory = Initializer->Classify(S.Context);
3827 // - If the reference is an lvalue reference and the initializer
3856 convertQualifiersAndValueKindIfNecessary(S, Sequence, Initializer,
3874 S, Entity, Kind, Initializer, /*AllowRValues*/isRValueRef, Sequence);
3904 // - If the initializer expression
3929 CheckCXX98CompatAccessibleCopy(S, Entity, Initializer);
3940 Initializer, cv1T1,
3957 S, Entity, Kind, Initializer, /*AllowRValues*/true, Sequence);
3979 // from the initializer expression using the rules for a non-reference
3988 = S.TryImplicitConversion(Initializer, TempEntity.getType(),
4025 // reference, the initializer expression shall not be an lvalue.
4042 Expr *Initializer,
4168 Expr *Initializer,
4173 QualType SourceType = Initializer->getType();
4220 Initializer, CandidateSet,
4224 Initializer, CandidateSet,
4231 SourceLocation DeclLoc = Initializer->getLocStart();
4263 ActingDC, Initializer, DestType,
4267 Initializer, DestType, CandidateSet,
4453 Expr *Initializer) {
4455 QualType ArgType = Initializer->getType();
4476 if (ArrayDecay || Initializer->isGLValue()) {
4487 ResultType = Initializer->getType().getNonLValueExprType(S.Context);
4500 Expr *Initializer) {
4502 !Initializer->isIntegerConstantExpr(S.getASTContext()))
4520 Expr *Initializer) {
4522 !Initializer->isIntegerConstantExpr(S.getASTContext()) ||
4523 (Initializer->EvaluateKnownConstInt(S.getASTContext()) != 0))
4564 // type is the type of the initializer expression. The source type is not
4565 // defined when the initializer is a braced-init-list or when it is a
4579 Expr *Initializer = nullptr;
4581 Initializer = Args[0];
4583 if (S.CheckObjCBridgeRelatedConversions(Initializer->getLocStart(),
4584 DestType, Initializer->getType(),
4585 Initializer) ||
4586 S.ConversionToObjCStringLiteralCheck(DestType, Initializer))
4587 Args[0] = Initializer;
4590 if (!isa<InitListExpr>(Initializer))
4591 SourceType = Initializer->getType();
4594 // - If the initializer is a (non-parenthesized) braced-init-list, the
4597 if (InitListExpr *InitList = dyn_cast_or_null<InitListExpr>(Initializer)) {
4617 // - If the initializer is (), the object is value-initialized.
4632 // initializer is a string literal, see 8.5.2.
4636 if (Initializer && isa<VariableArrayType>(DestAT)) {
4641 if (Initializer) {
4642 switch (IsStringInit(Initializer, DestAT, Context)) {
4644 TryStringLiteralInitialization(S, Entity, Kind, Initializer, *this);
4662 // type, so long as the initializer has no side effects.
4663 if (!S.getLangOpts().CPlusPlus && Initializer &&
4664 isa<CompoundLiteralExpr>(Initializer->IgnoreParens()) &&
4665 Initializer->getType()->isArrayType()) {
4667 = Context.getAsArrayType(Initializer->getType());
4670 else if (Initializer->HasSideEffects(S.Context))
4677 // class member of array type from a parenthesized initializer list.
4680 Initializer && isa<InitListExpr>(Initializer)) {
4681 TryListInitialization(S, Entity, Kind, cast<InitListExpr>(Initializer),
4704 tryObjCWritebackConversion(S, *this, Entity, Initializer)) {
4708 if (TryOCLSamplerInitialization(S, *this, DestType, Initializer))
4711 if (TryOCLZeroEventInitialization(S, *this, DestType, Initializer))
4741 TryUserDefinedConversion(S, Entity, Kind, Initializer, *this,
4755 TryUserDefinedConversion(S, Entity, Kind, Initializer, *this,
4762 // (possibly converted) value of the initializer expression. Standard
4764 // initializer expression to the cv-unqualified version of the
4768 = S.TryImplicitConversion(Initializer, Entity.getType(),
4799 if (isLibstdcxxPointerReturnFalseHack(S, Entity, Initializer)) {
4801 } else if (Initializer->getType() == Context.OverloadTy &&
4802 !S.ResolveAddressOfOverloadedFunction(Initializer, DestType,
4978 Expr *Initializer) {
5005 return Initializer->getLocStart();
5011 /// provided by the given initializer by calling the appropriate copy
5017 /// the type of the initializer expression or a superclass thereof.
5021 /// \param CurInit The initializer expression.
5027 /// \returns An expression that copies the initializer expression into
5448 // ctor-initializer persists until the constructor exits.
5461 // -- A temporary bound to a reference in a new-initializer persists
5463 // new-initializer.
5500 /// Update a glvalue expression that is used as the initializer of a reference
5508 // This is just redundant braces around an initializer. Step over it.
5577 // If we lifetime-extend a braced initializer which is initializing an
5597 // we should recursively lifetime-extend that initializer.
5658 // that has an initializer, then its type will be completed once
5659 // the initializer is instantiated.
5666 // compute the length of an initializer list without
5667 // performing full type-checking of the initializer list
5716 // from an initializer list. For parameters, we produce a better warning
5745 // For initialization steps that start with a single initializer,
5747 // initializer.
5802 // initializer to reflect that choice.
6113 // When an initializer list is passed for a parameter of type "reference
6154 // When an initializer list is passed for a parameter of type "reference
6816 OS << "array requires initializer list";
6820 OS << "array requires initializer list or string literal";
6824 OS << "array requires initializer list or wide string literal";
6844 OS << "non-constant array initializer";
6888 OS << "referencing binding to initializer list";
6892 OS << "initializer list for non-aggregate, non-scalar type";
6916 OS << "variable length array has an initializer";
6920 OS << "initializer expression isn't contextually valid";
7019 OS << "unwrap reference initializer list";
7023 OS << "rewrap reference initializer list";
7067 OS << "std::initializer_list from initializer list";