Lines Matching full:initialization

28 #include "clang/Sema/Initialization.h"
46 // Sema Initialization Checking
72 /// expression by means of string initialization. Returns SIF_None if so,
74 /// initialization would not work.
154 assert(false && "Unevaluated string literal in initialization");
280 /// handle the initialization of a certain kind of entity, e.g.,
299 /// because they make the initialization "jump" into a specific
300 /// subobject and then continue the initialization from that
585 // does not have useful semantics for initialization from an init list.
586 // We treat this as copy-initialization, because aggregate initialization
587 // always performs copy-initialization on its elements.
796 // Empty initialization requires a constructor call, so
816 /// with expressions that perform value-initialization of the
849 // A transparent ILE is not performing aggregate initialization and should
899 // Only look at the first initialization of a union.
947 // In VerifyOnly mode, there's no point performing empty initialization
972 // For arrays, just set the expression used for value-initialization
979 // For arrays, just set the expression used for value-initialization
987 // Empty initialization requires a constructor call, so
1081 /// the braces in aggregate initialization.
1083 // Recursive initialization of the one and only field within an aggregate
1085 // initialization of std::array, where the C++ standard suggests the idiom of
1094 // Allows elide brace initialization for aggregates with empty base.
1125 /// onwards, with the fully-braced, desugared form of the initialization.
1207 // Don't warn during template instantiation. If the initialization was
1229 // Warn on aggregate initialization but not on ctor init list or
1237 // No warning, might be direct-list-initialization.
1238 // FIXME: Should we warn for copy-list-initialization in these cases?
1273 /// form of the initialization.
1451 // Nested aggregate initialization and C++ initialization are handled later.
1456 "found implicit initialization for the wrong type");
1472 // we need initialization entity with a type of a vector (and not a vector
1539 // Fall through for subaggregate initialization
1562 // Fall through for subaggregate initialization.
1592 // Fall through for subaggregate initialization
1599 // considered for the initialization of the first member of
1625 // initialization will fail.
1631 "expected non-aggregate initialization to fail");
1976 /// Aggregate initialization requires a class element's destructor be
1980 /// (15.4 [class.dtor]) from the context where the aggregate initialization
2695 // C++20 designated initialization can result in direct-list-initialization
2697 // performing direct initialization as part of aggregate initialization, so
2702 "designator result in direct non-list initialization?");
2720 // Check the actual initialization for the designated object type.
2763 // initialization that completely initialized the current
2954 // initialization, only on actually performing initialization,
3345 // initialization that completely initialized the current
3353 // from the prior initialization.
3555 // Initialization entity
3747 // Initialization sequence
4114 // Attempt initialization
4175 /// initialization of an object of type std::initializer_list<T>.
4177 /// \return true if we have handled initialization of an object of type
4249 // of a class copy-initialization, or
4271 // argument in the context of direct-initialization, explicit
4287 // ([over.match.ctor]) or by list-initialization ([over.match.list])
4291 // direct-initialization.
4331 /// Attempt initialization by constructor (C++ [dcl.init]), which
4337 /// \param IsListInit Is this list-initialization?
4338 /// \param IsInitListCopy Is this non-list-initialization resulting from a
4339 /// list-initialization from {x} where x is the same
4390 assert(DestRecordType && "Constructor initialization requires record type");
4394 // Build the candidate set directly in the initialization sequence
4476 // If a program calls for the default initialization of an object
4494 // In copy-list-initialization, if an explicit constructor is chosen, the
4503 // In some copy-initialization contexts, a two-stage overload resolution
4506 // need the initialization sequence to decide whether to perform the second
4509 // initialization sequence.
4513 // Add the constructor initialization step. Any cv-qualification conversion is
4514 // subsumed by the initialization.
4565 /// Attempt list initialization of a reference.
4588 // Reference initialization via an initializer list works thus:
4650 // List-initialization of an object or reference of type T is defined as
4668 /// Attempt list initialization (C++0x [dcl.init.list])
4677 // C++ doesn't allow scalar initialization with more than one argument.
4698 // be an aggregate class. [...] Aggregate initialization is performed.
4702 // FIXME: This check should precede the handling of reference initialization.
4715 // initialized from that element (by copy-initialization for
4716 // copy-list-initialization, or by direct-initialization for
4717 // direct-list-initialization).
4720 // (8.5.2 [dcl.init.string]), initialization is performed as described
4763 // - If T is an aggregate, aggregate initialization is performed.
4799 // the initializer-list has a single element v, and the initialization
4800 // is direct-list-initialization, the object is initialized with the
4841 // initialized from that element (by copy-initialization for
4842 // copy-list-initialization, or by direct-initialization for
4843 // direct-list-initialization); if a narrowing conversion is required
4846 // Per core-24034, this is direct-initialization if we were performing
4847 // direct-list-initialization and copy-initialization otherwise.
4849 // copy-initialization. This only matters if we might use an 'explicit'
4880 // Add the list initialization step with the built init list.
4884 /// Try a reference initialization that involves calling a conversion
4899 // Build the candidate set directly in the initialization sequence
4907 // initializing a reference, not even for direct-initialization.
4995 // This is the overload that will be used for this initialization step if we
4996 // use this initialization. Mark it as referenced.
5070 /// Attempt reference initialization (C++0x [dcl.init.ref])
5105 /// Reference initialization without resolving overloaded functions.
5354 // copy-initialization (8.5). The reference is then bound to the
5368 // copy-initialization?
5431 /// Attempt character array initialization from a string literal
5441 /// Attempt value initialization (C++ [dcl.init]p7).
5464 // initialization is ill-formed if T has no accessible default
5490 // [...] A program that calls for [...] value-initialization of an
5493 // C++11 doesn't need this handling, because value-initialization does not
5502 // If this is list-value-initialization, pass the empty init list on when
5519 /// Attempt default initialization (C++ [dcl.init]p6).
5532 // constructor for T is called (and the initialization is ill-formed if
5540 // - otherwise, no initialization is performed.
5542 // If a program calls for the default initialization of an object of
5615 // Braced-initialization of variable array types is not allowed, even if
5617 // allow them to be initialized via parenthesized aggregate initialization
5659 // We do the same for braced list initialization in
5825 // Build the candidate set directly in the initialization sequence
5913 // In some copy-initialization contexts, a two-stage overload resolution
5916 // need the initialization sequence to decide whether to perform the second
5929 // subsumed by the initialization. Per DR5, the created temporary is of the
5940 // copy-initialization.
5948 // is the destination of the copy-initialization.
5966 // destination of the copy-initialization.
6100 /// purposes of GNU by-copy array initialization.
6205 // We should allow zero initialization for all types defined in the
6373 // Handle default initialization.
6385 // non-array types for initialization.
6418 // Some kinds of initialization permit an array to be initialized from
6419 // another array of the same type, and perform elementwise initialization.
6446 // Note: as an GNU C extension, we allow initialization of an
6462 // Note: as a GNU C++ extension, we allow list-initialization of a
6505 // Handle initialization in C
6515 // - If the initialization is direct-initialization, or if it is
6516 // copy-initialization where the cv-unqualified version of the
6538 // Do not attempt paren list initialization if overload resolution
6544 // is implicitly deleted, so we need to prevent aggregate initialization
6545 // (otherwise, it'll attempt aggregate initialization by initializing
6561 // - Otherwise (i.e., for the remaining copy-initialization cases),
6576 // For HLSL ext vector types we allow list initialization behavior for C++
6577 // constructor syntax. This is accomplished by converting initialization
6640 // - Otherwise, if the initialization is direct-initialization, the source
6715 // Perform initialization
6751 // This is really initialization, but refer to it as conversion for
6806 /// created for that initialization, requires destruction.
6839 /// Get the location at which initialization diagnostics should appear.
6920 // C++11 [dcl.init]p16, second bullet for class types, this initialization
6921 // is direct-initialization.
6976 // binding purposes, just return the original initialization
7020 // of constructor initialization, while copy elision for exception handlers
7123 /// Returns true if the parameters describe a constructor initialization of
7190 // context of direct-initialization, explicit conversion functions
7248 // Only get the parenthesis or brace range if it is a list initialization or
7496 // The initialization would have succeeded with this fixit. Since the fixit
7569 // No steps means no initialization.
7618 // HLSL allows vector initialization to function like list initialization, but
7624 // For initialization steps that start with a single initializer,
7676 // C++11 list-initialization; we need to instantiate entities usable in
7693 // Walk through the computed steps for the initialization sequence,
7805 // If the overall initialization is initializing a temporary, we already
8094 // The need for zero-initialization is recorded directly into
8324 // Sampler initialization have 5 cases:
8329 // 2. variable initialization
8340 "Sampler initialization on non-sampler type.");
8419 "Wrong type for initialization of OpenCL opaque type.");
8447 // Diagnose non-fatal problems with the completed initialization.
8498 // Diagnose initialization failures
8501 /// Emit notes associated with an initialization that failed due to a
8551 // A list-initialization failure for a reference means that we tried to
8553 // inner initialization failed.
8608 // If this is value-initialization, this could be nested some way within
8919 // This is implicit default initialization of a member or
9007 // This is implicit default-initialization of a const member in
9138 OS << "overload resolution for reference initialization failed";
9166 OS << "reference initialization drops qualifiers";
9174 OS << "reference initialization failed";
9210 OS << "default initialization of a const variable";
9214 OS << "initialization of incomplete type";
9218 OS << "list initialization checker failure";
9234 OS << "list copy initialization chose explicit constructor";
9238 OS << "parenthesized list initialization failed";
9289 OS << "final copy in class direct-initialization";
9333 OS << "list aggregate initialization";
9345 OS << "constructor initialization";
9349 OS << "list initialization via constructor";
9353 OS << "zero initialization";
9361 OS << "string initialization";
9369 OS << "indexing for array initialization loop";
9373 OS << "array initialization loop";
9377 OS << "array initialization";
9381 OS << "array initialization (GNU extension)";
9385 OS << "parenthesized array initialization";
9405 OS << "list initialization from std::initializer_list";
9416 OS << "initialization from a parenthesized list of values";
9598 // Initialization helper functions
9607 assert(InitE && "No initialization expression");
9625 assert(InitE && "No initialization expression?");
9634 // Prevent infinite recursion when performing parameter copy-initialization.
9764 // Figure out if this is list-initialization.
9771 // Initialization and overload resolution are performed as described in
9773 // (as appropriate for the type of initialization performed) for an object
9791 // C++ [over.match.ctor]p1: (non-list copy-initialization from non-class)
9792 // For copy-initialization, the candidate functions are all the
9794 // C++ [over.match.copy]p1: (non-list copy-initialization from class)
9808 // C++ [over.match.list]p1.1: (first phase list initialization)
9818 // C++ [over.match.list]p1.2: (second phase list initialization)
9947 // C++11 [over.match.list]p1, per DR1467: for list-initialization, first
9983 // If list-initialization fails, or if we're doing any other kind of
9984 // initialization, we (eventually) consider constructors.
9990 // FIXME: For list-initialization candidates, it'd usually be better to
10028 // In copy-list-initialization, if an explicit constructor is chosen, the
10029 // initialization is ill-formed.