Lines Matching defs:ICS
1008 ImplicitConversionSequence ICS;
1013 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1014 return ICS;
1020 = IsUserDefinedConversion(S, From, ToType, ICS.UserDefined, Conversions,
1024 ICS.setUserDefined();
1025 // C++ [over.ics.user]p4:
1033 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
1042 ICS.setStandard();
1043 ICS.Standard.setAsIdentityConversion();
1044 ICS.Standard.setFromType(From->getType());
1045 ICS.Standard.setAllToTypes(ToType);
1046 ICS.Standard.CopyConstructor = Constructor;
1048 ICS.Standard.Second = ICK_Derived_To_Base;
1052 // C++ [over.best.ics]p4:
1059 if (SuppressUserConversions && ICS.isUserDefined()) {
1060 ICS.setBad(BadConversionSequence::suppressed_user, From, ToType);
1063 ICS.setAmbiguous();
1064 ICS.Ambiguous.setFromType(From->getType());
1065 ICS.Ambiguous.setToType(ToType);
1069 ICS.Ambiguous.addConversion(Cand->Function);
1071 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1074 return ICS;
1111 ImplicitConversionSequence ICS;
1113 ICS.Standard, CStyle, AllowObjCWritebackConversion)){
1114 ICS.setStandard();
1115 return ICS;
1119 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1120 return ICS;
1123 // C++ [over.ics.user]p4:
1134 ICS.setStandard();
1135 ICS.Standard.setAsIdentityConversion();
1136 ICS.Standard.setFromType(FromType);
1137 ICS.Standard.setAllToTypes(ToType);
1143 ICS.Standard.CopyConstructor = 0;
1147 ICS.Standard.Second = ICK_Derived_To_Base;
1149 return ICS;
1178 ImplicitConversionSequence ICS;
1179 return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
1185 ImplicitConversionSequence& ICS) {
1194 ICS = clang::TryImplicitConversion(*this, From, ToType,
1200 return PerformImplicitConversion(From, ToType, ICS, Action);
1303 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1560 // C++ [over.best.ics]p6:
2893 /// (C++ [over.ics.user]) that converts expression From to the type
3052 // C++ [over.ics.user]p1:
3082 // C++ [over.ics.user]p1:
3094 // C++ [over.ics.user]p2:
3123 ImplicitConversionSequence ICS;
3126 IsUserDefinedConversion(*this, From, ToType, ICS.UserDefined,
3194 // C++0x [over.best.ics]p10:
3312 // C++0x [over.ics.rank]p3b4:
3376 // C++ [over.ics.rank]p4b2:
3451 // C++ [over.ics.rank]p3b4:
3623 /// [over.ics.rank]p4b3). As part of these checks, we also look at
3647 // C++ [over.ics.rank]p4b3:
3901 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
3981 // C++ [over.ics.ref]p1:
3996 ICS.setUserDefined();
3997 ICS.UserDefined.Before = Best->Conversions[0].Standard;
3998 ICS.UserDefined.After = Best->FinalConversion;
3999 ICS.UserDefined.HadMultipleCandidates = HadMultipleCandidates;
4000 ICS.UserDefined.ConversionFunction = Best->Function;
4001 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
4002 ICS.UserDefined.EllipsisConversion = false;
4003 assert(ICS.UserDefined.After.ReferenceBinding &&
4004 ICS.UserDefined.After.DirectBinding &&
4009 ICS.setAmbiguous();
4013 ICS.Ambiguous.addConversion(Cand->Function);
4036 ImplicitConversionSequence ICS;
4037 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4072 // Per C++ [over.ics.ref]p4, we don't check the bit-field property here.
4075 // C++ [over.ics.ref]p1:
4082 ICS.setStandard();
4083 ICS.Standard.First = ICK_Identity;
4084 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4087 ICS.Standard.Third = ICK_Identity;
4088 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4089 ICS.Standard.setToType(0, T2);
4090 ICS.Standard.setToType(1, T1);
4091 ICS.Standard.setToType(2, T1);
4092 ICS.Standard.ReferenceBinding = true;
4093 ICS.Standard.DirectBinding = true;
4094 ICS.Standard.IsLvalueReference = !isRValRef;
4095 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4096 ICS.Standard.BindsToRvalue = false;
4097 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4098 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4099 ICS.Standard.CopyConstructor = 0;
4104 // [over.best.ics]p2).
4105 return ICS;
4118 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4121 return ICS;
4129 // We actually handle one oddity of C++ [over.ics.ref] at this
4139 return ICS;
4149 ICS.setStandard();
4150 ICS.Standard.First = ICK_Identity;
4151 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4154 ICS.Standard.Third = ICK_Identity;
4155 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4156 ICS.Standard.setToType(0, T2);
4157 ICS.Standard.setToType(1, T1);
4158 ICS.Standard.setToType(2, T1);
4159 ICS.Standard.ReferenceBinding = true;
4165 ICS.Standard.DirectBinding =
4168 ICS.Standard.IsLvalueReference = !isRValRef;
4169 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4170 ICS.Standard.BindsToRvalue = InitCategory.isRValue();
4171 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4172 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4173 ICS.Standard.CopyConstructor = 0;
4174 return ICS;
4189 FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4196 if (ICS.isUserDefined() && isRValRef &&
4197 ICS.UserDefined.After.First == ICK_Lvalue_To_Rvalue)
4198 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4200 return ICS;
4225 return ICS;
4235 return ICS;
4241 return ICS;
4243 // C++ [over.ics.ref]p2:
4253 ICS = TryImplicitConversion(S, Init, T1, SuppressUserConversions,
4260 if (ICS.isStandard()) {
4261 ICS.Standard.ReferenceBinding = true;
4262 ICS.Standard.IsLvalueReference = !isRValRef;
4263 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4264 ICS.Standard.BindsToRvalue = true;
4265 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4266 ICS.Standard.ObjCLifetimeConversionBinding = false;
4267 } else if (ICS.isUserDefined()) {
4271 = ICS.UserDefined.ConversionFunction->getResultType()
4274 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, Init,
4276 return ICS;
4281 ICS.UserDefined.After.ReferenceBinding = true;
4282 ICS.UserDefined.After.IsLvalueReference = !isRValRef;
4283 ICS.UserDefined.After.BindsToFunctionLvalue = T2->isFunctionType();
4284 ICS.UserDefined.After.BindsToRvalue = true;
4285 ICS.UserDefined.After.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4286 ICS.UserDefined.After.ObjCLifetimeConversionBinding = false;
4289 return ICS;
4306 // C++11 [over.ics.list]p1:
4319 // C++11 [over.ics.list]p2:
4333 ImplicitConversionSequence ICS =
4338 if (ICS.isBad()) {
4339 Result = ICS;
4344 CompareImplicitConversionSequences(S, ICS, Result) ==
4346 Result = ICS;
4363 // C++11 [over.ics.list]p3:
4379 // C++11 [over.ics.list]p4:
4405 // C++11 [over.ics.list]p5:
4473 // C++11 [over.ics.list]p6:
4497 // C++11 [over.ics.list]p7:
4538 ImplicitConversionSequence ICS =
4541 return !ICS.isBad();
4561 ImplicitConversionSequence ICS;
4598 ICS.setBad(BadConversionSequence::bad_qualifiers,
4600 return ICS;
4612 ICS.setBad(BadConversionSequence::unrelated_class,
4614 return ICS;
4626 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, FromType,
4628 return ICS;
4635 ICS.setBad(BadConversionSequence::rvalue_ref_to_lvalue, FromType,
4637 return ICS;
4643 ICS.setStandard();
4644 ICS.Standard.setAsIdentityConversion();
4645 ICS.Standard.Second = SecondKind;
4646 ICS.Standard.setFromType(FromType);
4647 ICS.Standard.setAllToTypes(ImplicitParamType);
4648 ICS.Standard.ReferenceBinding = true;
4649 ICS.Standard.DirectBinding = true;
4650 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
4651 ICS.Standard.BindsToFunctionLvalue = false;
4652 ICS.Standard.BindsToRvalue = FromClassification.isRValue();
4653 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier
4655 return ICS;
4683 ImplicitConversionSequence ICS
4686 if (ICS.isBad()) {
4687 if (ICS.Bad.Kind == BadConversionSequence::bad_qualifiers) {
4707 if (ICS.Standard.Second == ICK_Derived_To_Base) {
4741 ImplicitConversionSequence ICS = TryContextuallyConvertToBool(*this, From);
4742 if (!ICS.isBad())
4743 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
4823 ImplicitConversionSequence ICS =
4831 switch (ICS.getKind()) {
4833 if (!CheckConvertedConstantConversions(*this, ICS.Standard))
4837 SCS = &ICS.Standard;
4842 if (!CheckConvertedConstantConversions(*this, ICS.UserDefined.After))
4846 SCS = &ICS.UserDefined.After;
4860 ExprResult Result = PerformImplicitConversion(From, T, ICS, AA_Converting);
4939 ImplicitConversionSequence ICS
4949 switch (ICS.getKind()) {
4956 dropPointerConversion(ICS.UserDefined.After);
4960 dropPointerConversion(ICS.Standard);
4964 return ICS;
4974 ImplicitConversionSequence ICS =
4976 if (!ICS.isBad())
4977 return PerformImplicitConversion(From, Ty, ICS, AA_Converting);
5650 // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user]
5690 ImplicitConversionSequence ICS =
5696 switch (ICS.getKind()) {
5698 Candidate.FinalConversion = ICS.Standard;
5700 // C++ [over.ics.user]p3:
5705 GetConversionRank(ICS.Standard.Second) != ICR_Exact_Match) {
5716 ICS.Standard.First == ICK_Lvalue_To_Rvalue) {
8395 ICS = Cand->Conversions[ArgIdx];
8396 if (ICS.isBad()) break; // all meaningless after first invalid
8397 if (!ICS.isAmbiguous()) continue;
8399 ICS.DiagnoseAmbiguousConversion(S, OpLoc,