Home | History | Annotate | Download | only in Sema

Lines Matching defs:ICS

869   ImplicitConversionSequence ICS;
871 ICS.Standard, CStyle, AllowObjCWritebackConversion)){
872 ICS.setStandard();
873 return ICS;
877 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
878 return ICS;
881 // C++ [over.ics.user]p4:
892 ICS.setStandard();
893 ICS.Standard.setAsIdentityConversion();
894 ICS.Standard.setFromType(FromType);
895 ICS.Standard.setAllToTypes(ToType);
901 ICS.Standard.CopyConstructor = 0;
905 ICS.Standard.Second = ICK_Derived_To_Base;
907 return ICS;
913 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
914 return ICS;
920 = IsUserDefinedConversion(S, From, ToType, ICS.UserDefined, Conversions,
924 ICS.setUserDefined();
925 // C++ [over.ics.user]p4:
933 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
942 ICS.setStandard();
943 ICS.Standard.setAsIdentityConversion();
944 ICS
945 ICS.Standard.setAllToTypes(ToType);
946 ICS.Standard.CopyConstructor = Constructor;
948 ICS.Standard.Second = ICK_Derived_To_Base;
952 // C++ [over.best.ics]p4:
959 if (SuppressUserConversions && ICS.isUserDefined()) {
960 ICS.setBad(BadConversionSequence::suppressed_user, From, ToType);
963 ICS.setAmbiguous();
964 ICS.Ambiguous.setFromType(From->getType());
965 ICS.Ambiguous.setToType(ToType);
969 ICS.Ambiguous.addConversion(Cand->Function);
971 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
974 return ICS;
998 ImplicitConversionSequence ICS;
999 return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
1005 ImplicitConversionSequence& ICS) {
1011 ICS = clang::TryImplicitConversion(*this, From, ToType,
1017 return PerformImplicitConversion(From, ToType, ICS, Action);
1115 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1361 // C++ [over.best.ics]p6:
2467 /// (C++ [over.ics.user]) that converts expression From to the type
2594 // C++ [over.ics.user]p1:
2618 // C++ [over.ics.user]p1:
2630 // C++ [over.ics.user]p2:
2661 ImplicitConversionSequence ICS;
2664 IsUserDefinedConversion(*this, From, ToType, ICS.UserDefined,
2697 // C++0x [over.best.ics]p10:
2792 // C++0x [over.ics.rank]p3b4:
2856 // C++ [over.ics.rank]p4b2:
2931 // C++ [over.ics.rank]p3b4:
3103 /// [over.ics.rank]p4b3). As part of these checks, we also look at
3127 // C++ [over.ics.rank]p4b3:
3381 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
3461 // C++ [over.ics.ref]p1:
3476 ICS.setUserDefined();
3477 ICS.UserDefined.Before = Best->Conversions[0].Standard;
3478 ICS.UserDefined.After = Best->FinalConversion;
3479 ICS.UserDefined.HadMultipleCandidates = HadMultipleCandidates;
3480 ICS.UserDefined.ConversionFunction = Best->Function;
3481 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
3482 ICS.UserDefined.EllipsisConversion = false;
3483 assert(ICS.UserDefined.After.ReferenceBinding &&
3484 ICS.UserDefined.After.DirectBinding &&
3489 ICS.setAmbiguous();
3493 ICS.Ambiguous.addConversion(Cand->Function);
3516 ImplicitConversionSequence ICS;
3517 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
3552 // Per C++ [over.ics.ref]p4, we don't check the bit-field property here.
3555 // C++ [over.ics.ref]p1:
3562 ICS.setStandard();
3563 ICS.Standard.First = ICK_Identity;
3564 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
3567 ICS.Standard.Third = ICK_Identity;
3568 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
3569 ICS.Standard.setToType(0, T2);
3570 ICS.Standard.setToType(1, T1);
3571 ICS.Standard.setToType(2, T1);
3572 ICS.Standard.ReferenceBinding = true;
3573 ICS.Standard.DirectBinding = true;
3574 ICS.Standard.IsLvalueReference = !isRValRef;
3575 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
3576 ICS.Standard.BindsToRvalue = false;
3577 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
3578 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
3579 ICS.Standard.CopyConstructor = 0;
3584 // [over.best.ics]p2).
3585 return ICS;
3598 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
3601 return ICS;
3609 // We actually handle one oddity of C++ [over.ics.ref] at this
3619 return ICS;
3629 ICS.setStandard();
3630 ICS.Standard.First = ICK_Identity;
3631 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
3634 ICS.Standard.Third = ICK_Identity;
3635 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
3636 ICS.Standard.setToType(0, T2);
3637 ICS.Standard.setToType(1, T1);
3638 ICS.Standard.setToType(2, T1);
3639 ICS.Standard.ReferenceBinding = true;
3645 ICS.Standard.DirectBinding =
3648 ICS.Standard.IsLvalueReference = !isRValRef;
3649 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
3650 ICS.Standard.BindsToRvalue = InitCategory.isRValue();
3651 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
3652 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
3653 ICS.Standard.CopyConstructor = 0;
3654 return ICS;
3669 FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
3676 if (ICS.isUserDefined() && isRValRef &&
3677 ICS.UserDefined.After.First == ICK_Lvalue_To_Rvalue)
3678 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
3680 return ICS;
3705 return ICS;
3715 return ICS;
3721 return ICS;
3723 // C++ [over.ics.ref]p2:
3733 ICS = TryImplicitConversion(S, Init, T1, SuppressUserConversions,
3740 if (ICS.isStandard()) {
3741 ICS.Standard.ReferenceBinding = true;
3742 ICS.Standard.IsLvalueReference = !isRValRef;
3743 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
3744 ICS.Standard.BindsToRvalue = true;
3745 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
3746 ICS.Standard.ObjCLifetimeConversionBinding = false;
3747 } else if (ICS.isUserDefined()) {
3751 = ICS.UserDefined.ConversionFunction->getResultType()
3754 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, Init,
3756 return ICS;
3761 ICS.UserDefined.After.ReferenceBinding = true;
3762 ICS.UserDefined.After.IsLvalueReference = !isRValRef;
3763 ICS.UserDefined.After.BindsToFunctionLvalue = T2->isFunctionType();
3764 ICS.UserDefined.After.BindsToRvalue = true;
3765 ICS.UserDefined.After.BindsImplicitObjectArgumentWithoutRefQualifier = false;
3766 ICS.UserDefined.After.ObjCLifetimeConversionBinding = false;
3769 return ICS;
3785 // C++11 [over.ics.list]p1:
3792 // C++11 [over.ics.list]p2:
3802 // C++11 [over.ics.list]p3:
3812 // C++11 [over.ics.list]p4:
3821 // C++11 [over.ics.list]p5:
3827 // C++11 [over.ics.list]p6:
3849 // C++11 [over.ics.list]p7:
3889 ImplicitConversionSequence ICS =
3892 return !ICS.isBad();
3912 ImplicitConversionSequence ICS;
3949 ICS.setBad(BadConversionSequence::bad_qualifiers,
3951 return ICS;
3963 ICS.setBad(BadConversionSequence::unrelated_class,
3965 return ICS;
3977 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, FromType,
3979 return ICS;
3986 ICS.setBad(BadConversionSequence::rvalue_ref_to_lvalue, FromType,
3988 return ICS;
3994 ICS.setStandard();
3995 ICS.Standard.setAsIdentityConversion();
3996 ICS.Standard.Second = SecondKind;
3997 ICS.Standard.setFromType(FromType);
3998 ICS.Standard.setAllToTypes(ImplicitParamType);
3999 ICS.Standard.ReferenceBinding = true;
4000 ICS.Standard.DirectBinding = true;
4001 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
4002 ICS.Standard.BindsToFunctionLvalue = false;
4003 ICS.Standard.BindsToRvalue = FromClassification.isRValue();
4004 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier
4006 return ICS;
4034 ImplicitConversionSequence ICS
4037 if (ICS.isBad()) {
4038 if (ICS.Bad.Kind == BadConversionSequence::bad_qualifiers) {
4058 if (ICS.Standard.Second == ICK_Derived_To_Base) {
4089 ImplicitConversionSequence ICS = TryContextuallyConvertToBool(*this, From);
4090 if (!ICS.isBad())
4091 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
4117 ImplicitConversionSequence ICS
4127 switch (ICS.getKind()) {
4134 dropPointerConversion(ICS.UserDefined.After);
4138 dropPointerConversion(ICS.Standard);
4142 return ICS;
4149 ImplicitConversionSequence ICS =
4151 if (!ICS.isBad())
4152 return PerformImplicitConversion(From, Ty, ICS, AA_Converting);
4804 // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user]
4844 ImplicitConversionSequence ICS =
4850 switch (ICS.getKind()) {
4852 Candidate.FinalConversion = ICS.Standard;
4854 // C++ [over.ics.user]p3:
4859 GetConversionRank(ICS.Standard.Second) != ICR_Exact_Match) {
4870 ICS.Standard.First == ICK_Lvalue_To_Rvalue) {
7547 const ImplicitConversionSequence &ICS = Cand->Conversions[ArgIdx];
7548 if (ICS.isBad()) break; // all meaningless after first invalid
7549 if (!ICS.isAmbiguous()) continue;
7551 ICS.DiagnoseAmbiguousConversion(S, OpLoc,