Home | History | Annotate | Download | only in Sema

Lines Matching refs:Conversion

106 /// GetConversionRank - Retrieve the implicit conversion rank
107 /// corresponding to the given implicit conversion kind.
144 /// implicit conversion.
147 "No conversion",
156 "Integral conversion",
157 "Floating conversion",
158 "Complex conversion",
159 "Floating-integral conversion",
160 "Pointer conversion",
161 "Pointer-to-member conversion",
162 "Boolean conversion",
163 "Compatible-types conversion",
164 "Derived-to-base conversion",
165 "Vector conversion",
167 "Complex-real conversion",
168 "Block Pointer conversion",
169 "Transparent Union Conversion",
170 "Writeback conversion",
171 "OpenCL Zero Event Conversion",
172 "C specific type conversion"
177 /// StandardConversionSequence - Set the standard conversion
178 /// sequence to the identity conversion.
195 /// getRank - Retrieve the rank of this standard conversion sequence
209 /// isPointerConversionToBool - Determines whether this conversion is
210 /// a conversion of a pointer or pointer-to-member to bool. This is
211 /// used as part of the ranking of standard conversion sequences
230 /// conversion is a conversion of a pointer to a void pointer. This is
231 /// used as part of the ranking of standard conversion sequences (C++
240 // array-to-pointer implicit conversion, so check for its presence
241 // and redo the conversion to get a pointer.
252 /// Skip any implicit casts which could be either part of a narrowing conversion
253 /// or after one in an implicit conversion.
275 /// Check if this standard conversion sequence represents a narrowing
276 /// conversion, according to C++11 [dcl.init.list]p7.
279 /// \param Converted The result of applying this standard conversion sequence.
280 /// \param ConstantValue If this is an NK_Constant_Narrowing conversion, the
281 /// value of the expression prior to the narrowing conversion.
282 /// \param ConstantType If this is an NK_Constant_Narrowing conversion, the
283 /// type of the expression prior to the narrowing conversion.
292 // A narrowing conversion is an implicit conversion ...
310 // value after conversion will fit into the target type and will produce
330 // If the resulting value is different, this was a narrowing conversion.
345 // conversion is within the range of values that can be represented (even
376 // conversion will fit into the target type and will produce the original
414 // If the result is different, this was a narrowing conversion.
433 /// dump - Print this standard conversion sequence to standard
472 /// dump - Print this user-defined conversion sequence to standard
490 /// dump - Print this implicit conversion sequence to standard
495 OS << "Worst std::initializer_list element conversion: ";
498 OS << "Standard conversion: ";
502 OS << "User-defined conversion: ";
506 OS << "Ellipsis conversion";
509 OS << "Ambiguous conversion";
512 OS << "Bad conversion";
1122 /// \brief Tries a user-defined conversion from From to ToType.
1124 /// Produces an implicit conversion sequence for when a standard conversion
1137 // We're not in the case above, so there is no conversion that
1143 // Attempt user-defined conversion.
1154 // A conversion of an expression of class type to the same class
1155 // type is given Exact Match rank, and a conversion of an
1157 // given Conversion rank, in spite of the fact that a copy
1158 // constructor (i.e., a user-defined conversion function) is
1169 // Turn this into a "standard" conversion sequence, so that it
1170 // gets ranked with standard conversion sequences.
1201 /// TryImplicitConversion - Attempt to perform an implicit conversion
1203 /// function returns an implicit conversion sequence that can be used
1209 /// this routine would produce an implicit conversion sequence to
1211 /// conversion sequence containing an lvalue-to-rvalue conversion (C++
1212 /// 4.1) followed by a floating-integral conversion (C++ 4.9).
1214 /// Note that this routine only determines how the conversion can be
1215 /// performed; it does not actually perform the conversion. As such,
1216 /// it will not produce any diagnostics if no conversion is available,
1217 /// but will instead return an implicit conversion sequence of kind
1226 /// writeback conversion, which allows __autoreleasing id* parameters to
1249 // A conversion of an expression of class type to the same class
1250 // type is given Exact Match rank, and a conversion of an
1252 // given Conversion rank, in spite of the fact that a copy/move
1253 // constructor (i.e., a user-defined conversion function) is
1270 // Determine whether this is considered a derived-to-base conversion.
1297 /// PerformImplicitConversion - Perform an implicit conversion of the
1299 /// converted expression. Flavor is the kind of conversion we're
1316 // Objective-C ARC: Determine whether we will allow the writeback conversion.
1333 /// \brief Determine whether the conversion from FromType to ToType is a valid
1334 /// conversion that strips "noreturn" off the nested function type.
1340 // Permit the conversion F(t __attribute__((noreturn))) -> F(t)
1381 /// \brief Determine whether the conversion from FromType to ToType is a valid
1382 /// vector conversion.
1384 /// \param ICK Will be set to the vector conversion kind, if this is a vector
1385 /// conversion.
1389 // conversion.
1400 // identity conversion.
1411 // We can perform the conversion between vector types in the following cases:
1432 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1433 /// expression From to the type ToType. Standard conversion sequences
1435 /// types, use TryImplicitConversion. If a conversion exists, SCS will
1436 /// contain the standard conversion sequence required to perform this
1437 /// conversion and this routine will return true. Otherwise, this
1458 // The first conversion can be an lvalue-to-rvalue conversion,
1459 // array-to-pointer conversion, or function-to-pointer conversion
1480 // otherwise, only a boolean conversion is standard
1514 // Lvalue-to-rvalue conversion (C++11 4.1):
1535 // Array-to-pointer conversion (C++ 4.2)
1544 // This conversion is deprecated in C++03 (D.4)
1548 // (13.3.3.1.1), this conversion is considered an
1549 // array-to-pointer conversion followed by a qualification
1550 // conversion (4.4). (C++ 4.2p2)
1558 // Function-to-pointer conversion (C++ 4.3).
1576 // The second conversion can be an integral promotion, floating
1577 // point promotion, integral conversion, floating point conversion,
1578 // floating-integral conversion, pointer conversion,
1579 // pointer-to-member conversion, or boolean conversion (C++ 4p1).
1581 // conversion.
1586 // conversion to do.
1658 // Treat a conversion that strips "noreturn" as an identity conversion.
1667 // tryAtomicConversion has updated the standard conversion sequence
1676 // No second conversion required.
1683 // The third conversion can be a qualification conversion (C++ 4p1).
1693 // No conversion required
1699 // a conversion. [...]
1715 // this is a bad conversion sequence, unless we're resolving an overload in C.
1728 // We need to set all three because we want this conversion to rank terribly,
1759 /// IsIntegralPromotion - Determines whether the conversion from the
1798 // with lowest integer conversion rank (4.13) greater than the rank of long
1808 // C++0x 7.2p9: Note that this implicit enum to int conversion is not
1874 // conversion.
1909 /// IsFloatingPointPromotion - Determines whether the conversion from
1940 /// \brief Determine if a conversion is a complex promotion.
1942 /// A complex promotion is defined as a complex -> complex conversion
1943 /// where the conversion between the underlying real types is a
1960 /// BuildSimilarlyQualifiedPointerType - In a pointer conversion from
2023 /// IsPointerConversion - Determines whether the conversion of the
2025 /// can be converted to the type ToType via a pointer conversion (C++
2037 /// set if the conversion is an allowed Objective-C conversion that
2048 // Conversion from a null pointer constant to any Objective-C pointer type.
2105 // pointer conversion, so don't do all of the work below.
2121 // MSVC allows implicit function to void* type conversion.
2131 // conversion for compatible-but-not-identical pointee types.
2146 // necessitates this conversion is ill-formed. The result of the
2147 // conversion is a pointer to the base class sub-object of the
2189 /// Objective-C pointer conversion. Subroutine of IsPointerConversion,
2208 // then this is not a pointer conversion.
2213 // Conversion between Objective-C pointers.
2274 // is an Objective-C conversion.
2278 // We always complain about this conversion.
2284 // Allow conversion of pointee being objective-c pointer to another one;
2298 // pointer conversions. If so, we permit the conversion (but
2306 // Objective-C pointer conversion.
2325 // Okay, we have an Objective-C pointer conversion.
2342 // Okay, we have an Objective-C pointer conversion.
2351 // We had an Objective-C conversion. Allow this pointer
2352 // conversion, but complain about it.
2362 /// \brief Determine whether this is an Objective-C writeback conversion,
2370 /// this conversion.
2446 // pointer conversions. If so, we permit the conversion.
2487 // Okay, we have an Objective-C pointer conversion.
2505 // Okay, we have an Objective-C pointer conversion.
2650 /// CheckPointerConversion - Check the pointer conversion from the
2683 // We must have a derived-to-base conversion. Check an
2684 // ambiguous or inaccessible conversion.
2691 // The conversion was successful.
2730 /// IsMemberPointerConversion - Determines whether the conversion of the
2732 /// converted to the type ToType via a member pointer conversion (C++ 4.11).
2771 /// CheckMemberPointerConversion - Check the member pointer conversion from the
2784 // This must be a null pointer to member pointer conversion
2831 // Must be a base to derived member conversion.
2837 /// Determine whether the lifetime conversion between the two given
2849 /// IsQualificationConversion - Determines whether the conversion from
2850 /// an rvalue of type FromType to ToType is a qualification conversion
2854 /// when the qualification conversion involves a change in the Objective-C
2864 // qualification conversion.
2869 // A conversion can add cv-qualifiers at levels other than the first
2876 // conversion. Then, if all is well, we unwrap one more level of
2929 // qualifiers above), then this is a qualification conversion.
2933 /// \brief - Determine whether this is a conversion from a scalar type to an
2936 /// If successful, updates \c SCS's second and third steps in the conversion
2937 /// sequence to finish the conversion.
3024 // Record the standard conversion we used and the conversion function.
3047 /// Determines whether there is a user-defined conversion sequence
3049 /// ToType. If such a conversion exists, User will contain the
3050 /// user-defined conversion sequence that performs such a conversion
3054 /// \param AllowExplicit true if the conversion should consider C++0x
3055 /// "explicit" conversion functions as well as non-explicit conversion
3058 /// \param AllowObjCConversionOnExplicit true if the conversion should
3059 /// allow an extra Objective-C pointer conversion on uses of explicit
3072 // If the type we are conversion to is a class type, enumerate its
3150 // Allow one user-defined conversion when user specifies a
3151 // From->ToType conversion via an static cast (c-style, etc).
3160 // Enumerate conversion functions, if we're allowed to.
3163 // No conversion functions from incomplete types.
3168 // Add all of the conversion functions as candidates.
3206 // Record the standard conversion we used and the conversion function.
3210 // If the user-defined conversion is specified by a
3211 // constructor (12.3.1), the initial standard conversion
3235 if (CXXConversionDecl *Conversion
3239 // [...] If the user-defined conversion is specified by a
3240 // conversion function (12.3.2), the initial standard
3241 // conversion sequence converts the source type to the
3242 // implicit object parameter of the conversion function.
3245 User.ConversionFunction = Conversion;
3250 // The second standard conversion sequence converts the
3251 // result of the user-defined conversion to the target type
3252 // for the sequence. Since an implicit conversion sequence
3254 // initialization by user-defined conversion apply when
3255 // selecting the best user-defined conversion for a
3256 conversion sequence (see 13.3.3 and
3261 llvm_unreachable("Not a constructor or conversion function?");
3296 /// \brief Compare the user-defined conversion functions or constructors
3297 /// of two user-defined conversion sequences to determine whether any ordering
3306 // If both conversion functions are implicitly-declared conversions from
3308 // respectively, always prefer the conversion to a function pointer,
3338 /// conversion sequences to determine whether one is better than the
3346 // conversion sequences (as defined in 13.3.3.1)
3347 // -- a standard conversion sequence (13.3.3.1.1) is a better
3348 // conversion sequence than a user-defined conversion sequence or
3349 // an ellipsis conversion sequence, and
3350 // -- a user-defined conversion sequence (13.3.3.1.2) is a better
3351 // conversion sequence than an ellipsis conversion sequence
3355 // For the purpose of ranking implicit conversion sequences as
3356 // described in 13.3.3.2, the ambiguous conversion sequence is
3358 // from any other user-defined conversion sequence.
3360 // String literal to 'char *' conversion has been deprecated in C++03. It has
3361 // been removed from C++11. We still accept this conversion, if it happens at
3362 // the best viable function. Otherwise, this conversion is considered worse
3363 // than ellipsis conversion. Consider this as an extension; this is not in the
3372 // conversion is better than string-literal to char* conversion (since there
3373 // is no such conversion in C++11). If there was no #1 at all or #1 couldn't
3375 // If the best viable function has this conversion, a warning will be issued
3390 // The following checks require both conversion sequences to be of
3398 // Two implicit conversion sequences of the same form are
3399 // indistinguishable conversion sequences unless one of the
3402 // List-initialization sequence L1 is a better conversion sequence than
3419 // Standard conversion sequence S1 is a better conversion sequence than
3420 // standard conversion sequence S2 if [...]
3424 // User-defined conversion sequence U1 is a better conversion
3425 // sequence than another user-defined conversion sequence U2 if
3426 // they contain the same user-defined conversion function or
3427 // constructor and if the second standard conversion sequence of
3428 // U1 is better than the second standard conversion sequence of
3454 // Per 13.3.3.2p3, compare the given standard conversion sequences to
3463 // the identity conversion sequence is considered to be a subsequence of
3464 // any non-identity conversion sequence
3527 /// conversion sequences to determine whether one is better than the
3534 // Standard conversion sequence S1 is a better conversion sequence
3535 // than standard conversion sequence S2 if (C++ 13.3.3.2p3):
3537 // -- S1 is a proper subsequence of S2 (comparing the conversion
3539 // excluding any Lvalue Transformation; the identity conversion
3541 // non-identity conversion sequence) or, if not that,
3555 // (C++ 13.3.3.2p4): Two conversion sequences with the same rank
3559 // A conversion that is not a conversion of a pointer, or
3560 // pointer to member, to bool is better than another conversion
3561 // that is such a conversion.
3570 // conversion of B* to A* is better than conversion of B* to
3571 // void*, and conversion of A* to void* is better than conversion
3578 // Exactly one of the conversion sequences is a conversion to
3579 // a void pointer; it's the worse conversion.
3583 // Neither conversion sequence converts to a void pointer; compare
3590 // Both conversion sequences are conversions to void
3597 // conversion, if we need to.
3678 // In Microsoft mode, prefer an integral conversion to a
3679 // floating-to-integral conversion if the integral conversion
3699 /// CompareQualificationConversions - Compares two standard conversion
3707 // -- S1 and S2 differ only in their qualification conversion and
3711 // deprecated string literal array-to-pointer conversion (4.2).
3717 // conversion (!)
3754 // conversion. Then, if all is well, we unwrap one more level of
3790 // Check that the winning standard conversion sequence isn't using
3791 // the deprecated string literal array to pointer conversion.
3810 /// CompareDerivedToBaseConversions - Compares two standard conversion
3825 // conversion, if we need to.
3857 // -- conversion of C* to B* is better than conversion of C* to A*,
3865 // -- conversion of B* to A* is better than conversion of C* to A*,
3884 // Apply the same conversion ranking rules for Objective-C pointer types
3897 // A conversion to an a non-id object pointer type or qualified 'id'
3898 // type is better than a conversion to 'id'.
3906 // A conversion to a non-id object pointer type is better than a
3907 // conversion to a qualified 'id' type
3913 // A conversion to an a non-Class object pointer type or qualified 'Class'
3914 // type is better than a conversion to 'Class'.
3922 // A conversion to a non-Class object pointer type is better than a
3923 // conversion to a qualified 'Class' type.
3929 // -- "conversion of C* to B* is better than conversion of C* to A*,"
3936 // -- "conversion of B* to A* is better than conversion of C* to A*,"
3964 // conversion of A::* to B::* is better than conversion of A::* to C::*,
3971 // conversion of B::* to C::* is better than conversion of A::* to C::*
3981 // -- conversion of C to B is better than conversion of C to A,
3993 // -- conversion of B to A is better than conversion of C to A.
4100 /// \brief Look for a user-defined conversion to an value reference-compatible
4127 // If this is an explicit conversion, and we're not allowed to consider
4137 // If we are initializing an rvalue reference, don't permit conversion
4156 // If the conversion function doesn't return a reference type,
4157 // it can't be considered for this conversion. An rvalue reference
4186 // applying a conversion function to the argument
4187 // expression, the implicit conversion sequence is a
4188 // user-defined conversion sequence (13.3.3.1.2), with the
4189 // second standard conversion sequence either an identity
4190 // conversion or, if the conversion function returns an
4192 // type, a derived-to-base Conversion.
4218 // There was no suitable conversion, or we found a deleted
4219 // conversion; continue with other checks.
4226 /// \brief Compute an implicit conversion sequence for reference
4235 // Most paths end in a failed conversion.
4277 // to an argument expression, the implicit conversion sequence
4278 // is the identity conversion, unless the argument expression
4280 // in which case the implicit conversion sequence is a
4281 // derived-to-base Conversion (13.3.3.1).
4304 // computing the implicit conversion sequence (C++
4313 // conversion is selected by enumerating the applicable
4314 // conversion functions (13.3.1.6) and choosing the best
4376 // expression in the first case and to the result of the conversion
4385 // and the second standard conversion sequence of the
4386 // user-defined conversion sequence includes an lvalue-to-rvalue
4387 // conversion, the program is ill-formed.
4441 // an argument expression, the conversion sequence is the one
4444 // 13.3.3.1. Conceptually, this conversion sequence corresponds
4448 // and does not constitute a conversion.
4471 // standard conversion sequence cannot be formed if it requires [...]
4524 // implicit conversion sequence is the one required to convert the element
4530 // implicit conversion sequence is the identity conversion.
4561 // conversion sequence is the worst conversion necessary to convert an
4568 // can be implicitly converted to X, the implicit conversion sequence is
4569 // the worst conversion necessary to convert an element of the list to X.
4590 // Otherwise, look for the worst conversion.
4598 // For an empty list, we won't have computed any conversion sequence.
4599 // Introduce the identity conversion sequence.
4615 // conversion sequence is a user-defined conversion sequence. If multiple
4617 // implicit conversion sequence is a user-defined conversion sequence.
4630 // initialized from the initializer list [...] the implicit conversion
4631 // sequence is a user-defined conversion sequence.
4704 "Sub-initialization cannot result in ellipsis conversion.");
4728 // initializer list, the implicit conversion sequence is the one
4736 // - if the initializer list has no elements, the implicit conversion
4737 // sequence is the identity conversion.
4749 // In all cases other than those enumerated above, no conversion is possible
4754 /// ToType from the expression From. Return the implicit conversion
4756 /// conversion sequence (meaning that the argument cannot be passed to
4758 /// do not permit any user-defined conversion sequences.
4811 // Set up the conversion sequence as a "bad" conversion, to allow us
4838 // However, when finding an implicit conversion sequence for the argument, we
4855 // affects the conversion rank.
4985 /// PerformContextuallyConvertToBool - Perform a contextual conversion
5002 /// Check that the specified conversion is permitted in a converted constant
5003 /// expression, according to C++11 [expr.const]p3. Return true if the conversion
5008 // type, most conversion kinds are impossible. All possible First and Third
5018 // Conversion from an integral or unscoped enumeration type to bool is
5020 // conversion, so we allow it in a converted constant expression.
5054 llvm_unreachable("found a first conversion kind in Second");
5057 llvm_unreachable("found a third conversion kind in Second");
5063 llvm_unreachable("unknown conversion kind");
5067 /// converted constant expression of type T, perform the conversion and produce
5082 // expression is a constant expression and the implicit conversion
5109 llvm_unreachable("ellipsis conversion in converted constant expression");
5130 // Check for a narrowing implicit conversion.
5136 // Implicit conversion to a narrower type, and the value is not a constant
5205 /// dropPointerConversions - If the given standard conversion sequence
5207 /// the result type of the conversion sequence.
5220 // Do an implicit conversion to 'id'.
5252 /// conversion of the expression From to an Objective-C pointer type.
5297 CXXConversionDecl *Conversion =
5301 // conversion; use it.
5302 QualType ConvTy = Conversion->getConversionType().getNonReferenceType();
5311 Converter.noteExplicitConv(SemaRef, Conversion, ConvTy);
5314 // explicit conversion function.
5319 ExprResult Result = SemaRef.BuildCXXMemberCallExpr(From, Found, Conversion,
5323 // Record usage of conversion in an implicit cast.
5335 CXXConversionDecl *Conversion =
5339 QualType ToType = Conversion->getConversionType().getNonReferenceType();
5348 ExprResult Result = SemaRef.BuildCXXMemberCallExpr(From, Found, Conversion,
5352 // Record usage of conversion in an implicit cast.
5403 /// must have a single non-explicit conversion function converting to a matching
5404 /// type. In C++1y, there can be multiple such conversion functions, but only
5408 /// conversion.
5412 /// \param Converter Used to control and diagnose the conversion process.
5463 // Look for a conversion to an integral or enumeration type.
5480 CXXConversionDecl *Conversion;
5484 Conversion = cast<CXXConversionDecl>(ConvTemplate->getTemplatedDecl());
5486 continue; // C++11 does not consider conversion operator templates(?).
5488 Conversion = cast<CXXConversionDecl>(D);
5491 "Conversion operator templates are considered potentially "
5494 QualType CurToType = Conversion->getConversionType().getNonReferenceType();
5497 if (Conversion->isExplicit()) {
5521 // for conversion functions whose return type is cv T or reference to
5550 // Apply this conversion.
5583 // Apply this conversion.
5641 /// conversions via constructors or conversion operators.
5766 // Determine the implicit conversion sequences for each of the
5771 // exist for each argument an implicit conversion sequence
6068 /// allow user-defined conversions via constructors or conversion
6136 // Determine the implicit conversion sequence for the object
6157 // Determine the implicit conversion sequences for each of the
6162 // exist for each argument an implicit conversion sequence
6295 /// Determine whether this is an allowable conversion from the result
6296 /// of an explicit conversion operator to the expected type, per C++
6299 /// \param ConvType The return type of the conversion function.
6303 /// \param AllowObjCPointerConversion Allow a conversion from one
6306 /// \returns true if the conversion is allowable, false otherwise.
6327 // Is this an Objective-C pointer conversion?
6334 /// AddConversionCandidate - Add a C++ conversion function as a
6339 /// conversion function produces).
6341 Sema::AddConversionCandidate(CXXConversionDecl *Conversion,
6347 assert(!Conversion->getDescribedFunctionTemplate() &&
6348 "Conversion function templates use AddTemplateConversionCandidate");
6349 QualType ConvType = Conversion->getConversionType().getNonReferenceType();
6350 if (!CandidateSet.isNewCandidate(Conversion))
6353 // If the conversion function has an undeduced return type, trigger its
6356 if (DeduceReturnType(Conversion, From->getExprLoc()))
6358 ConvType = Conversion->getConversionType().getNonReferenceType();
6361 // Per C++ [over.match.conv]p1, [over.match.ref]p1, an explicit conversion
6363 // can be converted to the target type with a qualification conversion.
6364 if (Conversion->isExplicit() &&
6375 Candidate.Function = Conversion;
6385 // For conversion functions, the function is considered to be a member of
6389 // Determine the implicit conversion sequence for the implicit
6399 From->Classify(Context), Conversion, ConversionContext);
6407 // We won't go through a user-defined type conversion function to convert a
6408 // derived to base as such conversions are given Conversion Rank. They only
6420 // To determine what the conversion from the result of calling the
6421 // conversion function to the type we're eventually trying to
6423 // conversion function and attempt copy initialization from it. This
6428 DeclRefExpr ConversionRef(Conversion, false, Conversion->getType(),
6431 Context.getPointerType(Conversion->getType()),
6435 QualType ConversionType = Conversion->getConversionType();
6461 // If the user-defined conversion is specified by a specialization of a
6462 // conversion function template, the second standard conversion sequence
6464 if (Conversion->getPrimaryTemplate() &&
6473 // the second standard conversion sequence of the user-defined
6474 // conversion sequence includes an lvalue-to-rvalue conversion, the
6491 "Can only end up with a standard conversion sequence or failure");
6494 if (EnableIfAttr *FailedAttr = CheckEnableIf(Conversion, None)) {
6502 /// \brief Adds a conversion function template specialization
6504 /// to deduce the template arguments of the conversion function
6515 "Only conversion function templates permitted here");
6538 // Add the conversion function template specialization produced by
6547 /// conversion function @c Conversion, and then attempts to call it
6550 void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion,
6557 if (!CandidateSet.isNewCandidate(Conversion))
6566 Candidate.Surrogate = Conversion;
6572 // Determine the implicit conversion sequence for the implicit
6576 Object->Classify(Context), Conversion, ActingContext);
6584 // The first conversion is actually a user-defined conversion whose
6585 // first conversion is ObjectInit's standard conversion (which is
6591 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
6618 // Determine the implicit conversion sequences for each of the
6623 // exist for each argument an implicit conversion sequence
6646 if (EnableIfAttr *FailedAttr = CheckEnableIf(Conversion, None)) {
6733 // Determine the implicit conversion sequences for each of the
6752 "Contextual conversion to bool requires bool type");
6979 /// AllowUserConversions is true if we should look at the conversion
6981 /// should also include the explicit conversion functions of a class
7034 // No conversion functions in incomplete types.
7043 // Skip conversion function templates; they don't tell us anything
7083 /// if any, found in visible type conversion functions found in ArgExpr's type.
8505 // conversion sequence than ICSi(F2), and then...
8514 // Cand1 has a better conversion sequence.
8528 // -- for some argument j, ICSj(F1) is a better conversion sequence than
8533 // -- the context is an initialization by user-defined conversion
8534 // (see 8.5, 13.3.1.5) and the standard conversion sequence
8537 // conversion sequence than the standard conversion sequence
8542 // First check whether we prefer one of the conversion functions over the
8544 // cases such as the conversion from a lambda closure type to a function
8556 // FIXME: Compare kind of reference binding if conversion functions
8791 assert(isa<CXXConversionDecl>(Meth) && "expected conversion");
8917 /// Diagnoses an ambiguous conversion. The partial diagnostic is the
8919 /// target types of the conversion.
8949 // There's a conversion slot for the object argument if this is a
8951 // conversion-slot index.
9153 // If we can fix the conversion, suggest the FixIts.
9589 // when user-conversion overload fails. Figure out how to handle
9767 // The conversion that can be fixed with a smaller number of changes,
9837 // Don't do anything on failures other than bad conversion.
9842 // Use a implicit copy initialization to check conversion fixes.
9845 // Skip forward to the first bad conversion.
9849 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
9861 "remaining conversion is initialized?");
9883 // Builtin binary operator with a bad first conversion.
9967 // ambiguous user-defined conversion.
11482 // Do placeholder-like conversion on the LHS; note that we should
12165 /// user-defined conversion on the object argument.
12211 // In addition, for each (non-explicit in C++0x) conversion function
12214 // operator conversion-type-id () cv-qualifier;
12217 // greater cv-qualification than, cv, and where conversion-type-id
12224 // functions for each conversion function declared in an
12235 // Skip over templated conversion functions; they aren't
12304 // surrogate candidates. Dig out the conversion function.
12314 "Found Decl & conversion-to-functionptr should be same, right?!");
12316 // object parameter to a function pointer. Perform the conversion
12319 // Create an implicit member expr to refer to the conversion operator.
12325 // Record usage of conversion in an implicit cast.
12728 assert(ICE->path_empty() && "fixing up hierarchy conversion?");