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.
276 /// Check if this standard conversion sequence represents a narrowing
277 /// conversion, according to C++11 [dcl.init.list]p7.
280 /// \param Converted The result of applying this standard conversion sequence.
281 /// \param ConstantValue If this is an NK_Constant_Narrowing conversion, the
282 /// value of the expression prior to the narrowing conversion.
283 /// \param ConstantType If this is an NK_Constant_Narrowing conversion, the
284 /// type of the expression prior to the narrowing conversion.
293 // A narrowing conversion is an implicit conversion ...
297 // A conversion to an enumeration type is narrowing if the conversion to
318 // value after conversion will fit into the target type and will produce
338 // If the resulting value is different, this was a narrowing conversion.
353 // conversion is within the range of values that can be represented (even
384 // conversion will fit into the target type and will produce the original
422 // If the result is different, this was a narrowing conversion.
441 /// dump - Print this standard conversion sequence to standard
480 /// dump - Print this user-defined conversion sequence to standard
498 /// dump - Print this implicit conversion sequence to standard
503 OS << "Worst std::initializer_list element conversion: ";
506 OS << "Standard conversion: ";
510 OS << "User-defined conversion: ";
514 OS << "Ellipsis conversion";
517 OS << "Ambiguous conversion";
520 OS << "Bad conversion";
1172 /// \brief Tries a user-defined conversion from From to ToType.
1174 /// Produces an implicit conversion sequence for when a standard conversion
1187 // We're not in the case above, so there is no conversion that
1193 // Attempt user-defined conversion.
1204 // A conversion of an expression of class type to the same class
1205 // type is given Exact Match rank, and a conversion of an
1207 // given Conversion rank, in spite of the fact that a copy
1208 // constructor (i.e., a user-defined conversion function) is
1219 // Turn this into a "standard" conversion sequence, so that it
1220 // gets ranked with standard conversion sequences.
1253 /// TryImplicitConversion - Attempt to perform an implicit conversion
1255 /// function returns an implicit conversion sequence that can be used
1261 /// this routine would produce an implicit conversion sequence to
1263 /// conversion sequence containing an lvalue-to-rvalue conversion (C++
1264 /// 4.1) followed by a floating-integral conversion (C++ 4.9).
1266 /// Note that this routine only determines how the conversion can be
1267 /// performed; it does not actually perform the conversion. As such,
1268 /// it will not produce any diagnostics if no conversion is available,
1269 /// but will instead return an implicit conversion sequence of kind
1278 /// writeback conversion, which allows __autoreleasing id* parameters to
1301 // A conversion of an expression of class type to the same class
1302 // type is given Exact Match rank, and a conversion of an
1304 // given Conversion rank, in spite of the fact that a copy/move
1305 // constructor (i.e., a user-defined conversion function) is
1322 // Determine whether this is considered a derived-to-base conversion.
1349 /// PerformImplicitConversion - Perform an implicit conversion of the
1351 /// converted expression. Flavor is the kind of conversion we're
1368 // Objective-C ARC: Determine whether we will allow the writeback conversion.
1385 /// \brief Determine whether the conversion from FromType to ToType is a valid
1386 /// conversion that strips "noreturn" off the nested function type.
1392 // Permit the conversion F(t __attribute__((noreturn))) -> F(t)
1433 /// \brief Determine whether the conversion from FromType to ToType is a valid
1434 /// vector conversion.
1436 /// \param ICK Will be set to the vector conversion kind, if this is a vector
1437 /// conversion.
1441 // conversion.
1452 // identity conversion.
1463 // We can perform the conversion between vector types in the following cases:
1484 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1485 /// expression From to the type ToType. Standard conversion sequences
1487 /// types, use TryImplicitConversion. If a conversion exists, SCS will
1488 /// contain the standard conversion sequence required to perform this
1489 /// conversion and this routine will return true. Otherwise, this
1510 // The first conversion can be an lvalue-to-rvalue conversion,
1511 // array-to-pointer conversion, or function-to-pointer conversion
1532 // otherwise, only a boolean conversion is standard
1566 // Lvalue-to-rvalue conversion (C++11 4.1):
1587 // Array-to-pointer conversion (C++ 4.2)
1596 // This conversion is deprecated in C++03 (D.4)
1600 // (13.3.3.1.1), this conversion is considered an
1601 // array-to-pointer conversion followed by a qualification
1602 // conversion (4.4). (C++ 4.2p2)
1610 // Function-to-pointer conversion (C++ 4.3).
1628 // The second conversion can be an integral promotion, floating
1629 // point promotion, integral conversion, floating point conversion,
1630 // floating-integral conversion, pointer conversion,
1631 // pointer-to-member conversion, or boolean conversion (C++ 4p1).
1633 // conversion.
1638 // conversion to do.
1678 // We of course allow this conversion if long double is really double.
1724 // Treat a conversion that strips "noreturn" as an identity conversion.
1733 // tryAtomicConversion has updated the standard conversion sequence
1742 // No second conversion required.
1749 // The third conversion can be a qualification conversion (C++ 4p1).
1759 // No conversion required
1765 // a conversion. [...]
1781 // this is a bad conversion sequence, unless we're resolving an overload in C.
1794 // We need to set all three because we want this conversion to rank terribly,
1825 /// IsIntegralPromotion - Determines whether the conversion from the
1863 // with lowest integer conversion rank (4.13) greater than the rank of long
1873 // C++0x 7.2p9: Note that this implicit enum to int conversion is not
1939 // conversion.
1974 /// IsFloatingPointPromotion - Determines whether the conversion from
2006 /// \brief Determine if a conversion is a complex promotion.
2008 /// A complex promotion is defined as a complex -> complex conversion
2009 /// where the conversion between the underlying real types is a
2026 /// BuildSimilarlyQualifiedPointerType - In a pointer conversion from
2089 /// IsPointerConversion - Determines whether the conversion of the
2091 /// can be converted to the type ToType via a pointer conversion (C++
2103 /// set if the conversion is an allowed Objective-C conversion that
2114 // Conversion from a null pointer constant to any Objective-C pointer type.
2171 // pointer conversion, so don't do all of the work below.
2187 // MSVC allows implicit function to void* type conversion.
2197 // conversion for compatible-but-not-identical pointee types.
2212 // necessitates this conversion is ill-formed. The result of the
2213 // conversion is a pointer to the base class sub-object of the
2255 /// Objective-C pointer conversion. Subroutine of IsPointerConversion,
2274 // then this is not a pointer conversion.
2279 // Conversion between Objective-C pointers.
2340 // is an Objective-C conversion.
2344 // We always complain about this conversion.
2350 // Allow conversion of pointee being objective-c pointer to another one;
2364 // pointer conversions. If so, we permit the conversion (but
2372 // Objective-C pointer conversion.
2391 // Okay, we have an Objective-C pointer conversion.
2408 // Okay, we have an Objective-C pointer conversion.
2417 // We had an Objective-C conversion. Allow this pointer
2418 // conversion, but complain about it.
2428 /// \brief Determine whether this is an Objective-C writeback conversion,
2436 /// this conversion.
2512 // pointer conversions. If so, we permit the conversion.
2553 // Okay, we have an Objective-C pointer conversion.
2571 // Okay, we have an Objective-C pointer conversion.
2715 /// CheckPointerConversion - Check the pointer conversion from the
2749 // We must have a derived-to-base conversion. Check an
2750 // ambiguous or inaccessible conversion.
2763 // The conversion was successful.
2802 /// IsMemberPointerConversion - Determines whether the conversion of the
2804 /// converted to the type ToType via a member pointer conversion (C++ 4.11).
2843 /// CheckMemberPointerConversion - Check the member pointer conversion from the
2856 // This must be a null pointer to member pointer conversion
2903 // Must be a base to derived member conversion.
2909 /// Determine whether the lifetime conversion between the two given
2921 /// IsQualificationConversion - Determines whether the conversion from
2922 /// an rvalue of type FromType to ToType is a qualification conversion
2926 /// when the qualification conversion involves a change in the Objective-C
2936 // qualification conversion.
2941 // A conversion can add cv-qualifiers at levels other than the first
2948 // conversion. Then, if all is well, we unwrap one more level of
3005 // qualifiers above), then this is a qualification conversion.
3009 /// \brief - Determine whether this is a conversion from a scalar type to an
3012 /// If successful, updates \c SCS's second and third steps in the conversion
3013 /// sequence to finish the conversion.
3087 // Record the standard conversion we used and the conversion function.
3110 /// Determines whether there is a user-defined conversion sequence
3112 /// ToType. If such a conversion exists, User will contain the
3113 /// user-defined conversion sequence that performs such a conversion
3117 /// \param AllowExplicit true if the conversion should consider C++0x
3118 /// "explicit" conversion functions as well as non-explicit conversion
3121 /// \param AllowObjCConversionOnExplicit true if the conversion should
3122 /// allow an extra Objective-C pointer conversion on uses of explicit
3135 // If the type we are conversion to is a class type, enumerate its
3203 // Allow one user-defined conversion when user specifies a
3204 // From->ToType conversion via an static cast (c-style, etc).
3213 // Enumerate conversion functions, if we're allowed to.
3216 // No conversion functions from incomplete types.
3221 // Add all of the conversion functions as candidates.
3259 // Record the standard conversion we used and the conversion function.
3263 // If the user-defined conversion is specified by a
3264 // constructor (12.3.1), the initial standard conversion
3288 if (CXXConversionDecl *Conversion
3292 // [...] If the user-defined conversion is specified by a
3293 // conversion function (12.3.2), the initial standard
3294 // conversion sequence converts the source type to the
3295 // implicit object parameter of the conversion function.
3298 User.ConversionFunction = Conversion;
3303 // The second standard conversion sequence converts the
3304 // result of the user-defined conversion to the target type
3305 // for the sequence. Since an implicit conversion sequence
3307 // initialization by user-defined conversion apply when
3308 // selecting the best user-defined conversion for a
3309 // user-defined conversion sequence (see 13.3.3 and
3314 llvm_unreachable("Not a constructor or conversion function?");
3349 /// \brief Compare the user-defined conversion functions or constructors
3350 /// of two user-defined conversion sequences to determine whether any ordering
3359 // If both conversion functions are implicitly-declared conversions from
3361 // respectively, always prefer the conversion to a function pointer,
3391 /// conversion sequences to determine whether one is better than the
3399 // conversion sequences (as defined in 13.3.3.1)
3400 // -- a standard conversion sequence (13.3.3.1.1) is a better
3401 // conversion sequence than a user-defined conversion sequence or
3402 // an ellipsis conversion sequence, and
3403 // -- a user-defined conversion sequence (13.3.3.1.2) is a better
3404 // conversion sequence than an ellipsis conversion sequence
3408 // For the purpose of ranking implicit conversion sequences as
3409 // described in 13.3.3.2, the ambiguous conversion sequence is
3411 // from any other user-defined conversion sequence.
3413 // String literal to 'char *' conversion has been deprecated in C++03. It has
3414 // been removed from C++11. We still accept this conversion, if it happens at
3415 // the best viable function. Otherwise, this conversion is considered worse
3416 // than ellipsis conversion. Consider this as an extension; this is not in the
3425 // conversion is better than string-literal to char* conversion (since there
3426 // is no such conversion in C++11). If there was no #1 at all or #1 couldn't
3428 // If the best viable function has this conversion, a warning will be issued
3443 // The following checks require both conversion sequences to be of
3451 // Two implicit conversion sequences of the same form are
3452 // indistinguishable conversion sequences unless one of the
3455 // List-initialization sequence L1 is a better conversion sequence than
3472 // Standard conversion sequence S1 is a better conversion sequence than
3473 // standard conversion sequence S2 if [...]
3477 // User-defined conversion sequence U1 is a better conversion
3478 // sequence than another user-defined conversion sequence U2 if
3479 // they contain the same user-defined conversion function or
3480 // constructor and if the second standard conversion sequence of
3481 // U1 is better than the second standard conversion sequence of
3507 // Per 13.3.3.2p3, compare the given standard conversion sequences to
3516 // the identity conversion sequence is considered to be a subsequence of
3517 // any non-identity conversion sequence
3580 /// conversion sequences to determine whether one is better than the
3587 // Standard conversion sequence S1 is a better conversion sequence
3588 // than standard conversion sequence S2 if (C++ 13.3.3.2p3):
3590 // -- S1 is a proper subsequence of S2 (comparing the conversion
3592 // excluding any Lvalue Transformation; the identity conversion
3594 // non-identity conversion sequence) or, if not that,
3608 // (C++ 13.3.3.2p4): Two conversion sequences with the same rank
3612 // A conversion that is not a conversion of a pointer, or
3613 // pointer to member, to bool is better than another conversion
3614 // that is such a conversion.
3623 // conversion of B* to A* is better than conversion of B* to
3624 // void*, and conversion of A* to void* is better than conversion
3631 // Exactly one of the conversion sequences is a conversion to
3632 // a void pointer; it's the worse conversion.
3636 // Neither conversion sequence converts to a void pointer; compare
3643 // Both conversion sequences are conversions to void
3650 // conversion, if we need to.
3731 // In Microsoft mode, prefer an integral conversion to a
3732 // floating-to-integral conversion if the integral conversion
3752 /// CompareQualificationConversions - Compares two standard conversion
3760 // -- S1 and S2 differ only in their qualification conversion and
3764 // deprecated string literal array-to-pointer conversion (4.2).
3770 // conversion (!)
3807 // conversion. Then, if all is well, we unwrap one more level of
3843 // Check that the winning standard conversion sequence isn't using
3844 // the deprecated string literal array to pointer conversion.
3863 /// CompareDerivedToBaseConversions - Compares two standard conversion
3878 // conversion, if we need to.
3910 // -- conversion of C* to B* is better than conversion of C* to A*,
3918 // -- conversion of B* to A* is better than conversion of C* to A*,
3937 // Apply the same conversion ranking rules for Objective-C pointer types
3950 // A conversion to an a non-id object pointer type or qualified 'id'
3951 // type is better than a conversion to 'id'.
3959 // A conversion to a non-id object pointer type is better than a
3960 // conversion to a qualified 'id' type
3966 // A conversion to an a non-Class object pointer type or qualified 'Class'
3967 // type is better than a conversion to 'Class'.
3975 // A conversion to a non-Class object pointer type is better than a
3976 // conversion to a qualified 'Class' type.
3982 // -- "conversion of C* to B* is better than conversion of C* to A*,"
3989 // -- "conversion of B* to A* is better than conversion of C* to A*,"
4017 // conversion of A::* to B::* is better than conversion of A::* to C::*,
4024 // conversion of B::* to C::* is better than conversion of A::* to C::*
4034 // -- conversion of C to B is better than conversion of C to A,
4046 // -- conversion of B to A is better than conversion of C to A.
4157 /// \brief Look for a user-defined conversion to an value reference-compatible
4184 // If this is an explicit conversion, and we're not allowed to consider
4194 // If we are initializing an rvalue reference, don't permit conversion
4213 // If the conversion function doesn't return a reference type,
4214 // it can't be considered for this conversion. An rvalue reference
4243 // applying a conversion function to the argument
4244 // expression, the implicit conversion sequence is a
4245 // user-defined conversion sequence (13.3.3.1.2), with the
4246 // second standard conversion sequence either an identity
4247 // conversion or, if the conversion function returns an
4249 // type, a derived-to-base Conversion.
4275 // There was no suitable conversion, or we found a deleted
4276 // conversion; continue with other checks.
4283 /// \brief Compute an implicit conversion sequence for reference
4292 // Most paths end in a failed conversion.
4334 // to an argument expression, the implicit conversion sequence
4335 // is the identity conversion, unless the argument expression
4337 // in which case the implicit conversion sequence is a
4338 // derived-to-base Conversion (13.3.3.1).
4361 // computing the implicit conversion sequence (C++
4370 // conversion is selected by enumerating the applicable
4371 // conversion functions (13.3.1.6) and choosing the best
4433 // expression in the first case and to the result of the conversion
4442 // and the second standard conversion sequence of the
4443 // user-defined conversion sequence includes an lvalue-to-rvalue
4444 // conversion, the program is ill-formed.
4501 // an argument expression, the conversion sequence is the one
4504 // 13.3.3.1. Conceptually, this conversion sequence corresponds
4508 // and does not constitute a conversion.
4531 // standard conversion sequence cannot be formed if it requires [...]
4584 // implicit conversion sequence is the one required to convert the element
4590 // implicit conversion sequence is the identity conversion.
4621 // conversion sequence is the worst conversion necessary to convert an
4628 // can be implicitly converted to X, the implicit conversion sequence is
4629 // the worst conversion necessary to convert an element of the list to X.
4650 // Otherwise, look for the worst conversion.
4658 // For an empty list, we won't have computed any conversion sequence.
4659 // Introduce the identity conversion sequence.
4675 // conversion sequence is a user-defined conversion sequence. If multiple
4677 // implicit conversion sequence is a user-defined conversion sequence.
4690 // initialized from the initializer list [...] the implicit conversion
4691 // sequence is a user-defined conversion sequence.
4764 "Sub-initialization cannot result in ellipsis conversion.");
4788 // initializer list, the implicit conversion sequence is the one
4796 // - if the initializer list has no elements, the implicit conversion
4797 // sequence is the identity conversion.
4809 // In all cases other than those enumerated above, no conversion is possible
4814 /// ToType from the expression From. Return the implicit conversion
4816 /// conversion sequence (meaning that the argument cannot be passed to
4818 /// do not permit any user-defined conversion sequences.
4871 // Set up the conversion sequence as a "bad" conversion, to allow us
4898 // However, when finding an implicit conversion sequence for the argument, we
4915 // affects the conversion rank.
5045 /// PerformContextuallyConvertToBool - Perform a contextual conversion
5062 /// Check that the specified conversion is permitted in a converted constant
5063 /// expression, according to C++11 [expr.const]p3. Return true if the conversion
5068 // type, most conversion kinds are impossible. All possible First and Third
5078 // Conversion from an integral or unscoped enumeration type to bool is
5080 // conversion, so we allow it in a converted constant expression.
5114 llvm_unreachable("found a first conversion kind in Second");
5117 llvm_unreachable("found a third conversion kind in Second");
5123 llvm_unreachable("unknown conversion kind");
5127 /// converted constant expression of type T, perform the conversion and produce
5142 // expression is a constant expression and the implicit conversion
5169 llvm_unreachable("ellipsis conversion in converted constant expression");
5190 // Check for a narrowing implicit conversion.
5196 // Implicit conversion to a narrower type, and the value is not a constant
5265 /// dropPointerConversions - If the given standard conversion sequence
5267 /// the result type of the conversion sequence.
5280 // Do an implicit conversion to 'id'.
5312 /// conversion of the expression From to an Objective-C pointer type.
5357 CXXConversionDecl *Conversion =
5361 // conversion; use it.
5362 QualType ConvTy = Conversion->getConversionType().getNonReferenceType();
5371 Converter.noteExplicitConv(SemaRef, Conversion, ConvTy);
5374 // explicit conversion function.
5379 ExprResult Result = SemaRef.BuildCXXMemberCallExpr(From, Found, Conversion,
5383 // Record usage of conversion in an implicit cast.
5395 CXXConversionDecl *Conversion =
5399 QualType ToType = Conversion->getConversionType().getNonReferenceType();
5408 ExprResult Result = SemaRef.BuildCXXMemberCallExpr(From, Found, Conversion,
5412 // Record usage of conversion in an implicit cast.
5463 /// must have a single non-explicit conversion function converting to a matching
5464 /// type. In C++1y, there can be multiple such conversion functions, but only
5468 /// conversion.
5472 /// \param Converter Used to control and diagnose the conversion process.
5523 // Look for a conversion to an integral or enumeration type.
5540 CXXConversionDecl *Conversion;
5544 Conversion = cast<CXXConversionDecl>(ConvTemplate->getTemplatedDecl());
5546 continue; // C++11 does not consider conversion operator templates(?).
5548 Conversion = cast<CXXConversionDecl>(D);
5551 "Conversion operator templates are considered potentially "
5554 QualType CurToType = Conversion->getConversionType().getNonReferenceType();
5557 if (Conversion->isExplicit()) {
5581 // for conversion functions whose return type is cv T or reference to
5610 // Apply this conversion.
5643 // Apply this conversion.
5701 /// conversions via constructors or conversion operators.
5826 // Determine the implicit conversion sequences for each of the
5831 // exist for each argument an implicit conversion sequence
6114 /// allow user-defined conversions via constructors or conversion
6182 // Determine the implicit conversion sequence for the object
6203 // Determine the implicit conversion sequences for each of the
6208 // exist for each argument an implicit conversion sequence
6341 /// Determine whether this is an allowable conversion from the result
6342 /// of an explicit conversion operator to the expected type, per C++
6345 /// \param ConvType The return type of the conversion function.
6349 /// \param AllowObjCPointerConversion Allow a conversion from one
6352 /// \returns true if the conversion is allowable, false otherwise.
6373 // Is this an Objective-C pointer conversion?
6380 /// AddConversionCandidate - Add a C++ conversion function as a
6385 /// conversion function produces).
6387 Sema::AddConversionCandidate(CXXConversionDecl *Conversion,
6393 assert(!Conversion->getDescribedFunctionTemplate() &&
6394 "Conversion function templates use AddTemplateConversionCandidate");
6395 QualType ConvType = Conversion->getConversionType().getNonReferenceType();
6396 if (!CandidateSet.isNewCandidate(Conversion))
6399 // If the conversion function has an undeduced return type, trigger its
6402 if (DeduceReturnType(Conversion, From->getExprLoc()))
6404 ConvType = Conversion->getConversionType().getNonReferenceType();
6407 // Per C++ [over.match.conv]p1, [over.match.ref]p1, an explicit conversion
6409 // can be converted to the target type with a qualification conversion.
6410 if (Conversion->isExplicit() &&
6421 Candidate.Function = Conversion;
6431 // For conversion functions, the function is considered to be a member of
6435 // Determine the implicit conversion sequence for the implicit
6445 From->Classify(Context), Conversion, ConversionContext);
6453 // We won't go through a user-defined type conversion function to convert a
6454 // derived to base as such conversions are given Conversion Rank. They only
6466 // To determine what the conversion from the result of calling the
6467 // conversion function to the type we're eventually trying to
6469 // conversion function and attempt copy initialization from it. This
6474 DeclRefExpr ConversionRef(Conversion, false, Conversion->getType(),
6477 Context.getPointerType(Conversion->getType()),
6481 QualType ConversionType = Conversion->getConversionType();
6507 // If the user-defined conversion is specified by a specialization of a
6508 // conversion function template, the second standard conversion sequence
6510 if (Conversion->getPrimaryTemplate() &&
6519 // the second standard conversion sequence of the user-defined
6520 // conversion sequence includes an lvalue-to-rvalue conversion, the
6537 "Can only end up with a standard conversion sequence or failure");
6540 if (EnableIfAttr *FailedAttr = CheckEnableIf(Conversion, None)) {
6548 /// \brief Adds a conversion function template specialization
6550 /// to deduce the template arguments of the conversion function
6561 "Only conversion function templates permitted here");
6584 // Add the conversion function template specialization produced by
6593 /// conversion function @c Conversion, and then attempts to call it
6596 void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion,
6603 if (!CandidateSet.isNewCandidate(Conversion))
6612 Candidate.Surrogate = Conversion;
6618 // Determine the implicit conversion sequence for the implicit
6622 Object->Classify(Context), Conversion, ActingContext);
6630 // The first conversion is actually a user-defined conversion whose
6631 // first conversion is ObjectInit's standard conversion (which is
6637 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
6664 // Determine the implicit conversion sequences for each of the
6669 // exist for each argument an implicit conversion sequence
6692 if (EnableIfAttr *FailedAttr = CheckEnableIf(Conversion, None)) {
6779 // Determine the implicit conversion sequences for each of the
6798 "Contextual conversion to bool requires bool type");
7026 /// AllowUserConversions is true if we should look at the conversion
7028 /// should also include the explicit conversion functions of a class
7081 // No conversion functions in incomplete types.
7090 // Skip conversion function templates; they don't tell us anything
7130 /// if any, found in visible type conversion functions found in ArgExpr's type.
8568 // conversion sequence than ICSi(F2), and then...
8577 // Cand1 has a better conversion sequence.
8591 // -- for some argument j, ICSj(F1) is a better conversion sequence than
8596 // -- the context is an initialization by user-defined conversion
8597 // (see 8.5, 13.3.1.5) and the standard conversion sequence
8600 // conversion sequence than the standard conversion sequence
8605 // First check whether we prefer one of the conversion functions over the
8607 // cases such as the conversion from a lambda closure type to a function
8619 // FIXME: Compare kind of reference binding if conversion functions
8907 assert(isa<CXXConversionDecl>(Meth) && "expected conversion");
9032 /// Diagnoses an ambiguous conversion. The partial diagnostic is the
9034 /// target types of the conversion.
9064 // There's a conversion slot for the object argument if this is a
9066 // conversion-slot index.
9283 // If we can fix the conversion, suggest the FixIts.
9738 // when user-conversion overload fails. Figure out how to handle
9923 // The conversion that can be fixed with a smaller number of changes,
9993 // Don't do anything on failures other than bad conversion.
9998 // Use a implicit copy initialization to check conversion fixes.
10001 // Skip forward to the first bad conversion.
10005 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
10017 "remaining conversion is initialized?");
10039 // Builtin binary operator with a bad first conversion.
10123 // ambiguous user-defined conversion.
11729 // Do placeholder-like conversion on the LHS; note that we should
12422 /// user-defined conversion on the object argument.
12468 // In addition, for each (non-explicit in C++0x) conversion function
12471 // operator conversion-type-id () cv-qualifier;
12474 // greater cv-qualification than, cv, and where conversion-type-id
12481 // functions for each conversion function declared in an
12492 // Skip over templated conversion functions; they aren't
12561 // surrogate candidates. Dig out the conversion function.
12571 "Found Decl & conversion-to-functionptr should be same, right?!");
12573 // object parameter to a function pointer. Perform the conversion
12576 // Create an implicit member expr to refer to the conversion operator.
12582 // Record usage of conversion in an implicit cast.
12985 assert(ICE->path_empty() && "fixing up hierarchy conversion?");