Lines Matching defs:ICS
1099 ImplicitConversionSequence ICS;
1104 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1105 return ICS;
1111 = IsUserDefinedConversion(S, From, ToType, ICS.UserDefined, Conversions,
1115 ICS.setUserDefined();
1116 // C++ [over.ics.user]p4:
1124 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
1133 ICS.setStandard();
1134 ICS.Standard.setAsIdentityConversion();
1135 ICS.Standard.setFromType(From->getType());
1136 ICS.Standard.setAllToTypes(ToType);
1137 ICS.Standard.CopyConstructor = Constructor;
1139 ICS.Standard.Second = ICK_Derived_To_Base;
1143 // C++ [over.best.ics]p4:
1150 if (SuppressUserConversions && ICS.isUserDefined()) {
1151 ICS.setBad(BadConversionSequence::suppressed_user, From, ToType);
1154 ICS.setAmbiguous();
1155 ICS.Ambiguous.setFromType(From->getType());
1156 ICS.Ambiguous.setToType(ToType);
1160 ICS.Ambiguous.addConversion(Cand->Function);
1162 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1165 return ICS;
1202 ImplicitConversionSequence ICS;
1204 ICS.Standard, CStyle, AllowObjCWritebackConversion)){
1205 ICS.setStandard();
1206 return ICS;
1210 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1211 return ICS;
1214 // C++ [over.ics.user]p4:
1225 ICS.setStandard();
1226 ICS.Standard.setAsIdentityConversion();
1227 ICS.Standard.setFromType(FromType);
1228 ICS.Standard.setAllToTypes(ToType);
1234 ICS.Standard.CopyConstructor = 0;
1238 ICS.Standard.Second = ICK_Derived_To_Base;
1240 return ICS;
1269 ImplicitConversionSequence ICS;
1270 return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
1276 ImplicitConversionSequence& ICS) {
1285 ICS = clang::TryImplicitConversion(*this, From, ToType,
1291 return PerformImplicitConversion(From, ToType, ICS, Action);
1394 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1656 // C++ [over.best.ics]p6:
2971 /// (C++ [over.ics.user]) that converts expression From to the type
3128 // C++ [over.ics.user]p1:
3156 // C++ [over.ics.user]p1:
3168 // C++ [over.ics.user]p2:
3197 ImplicitConversionSequence ICS;
3200 IsUserDefinedConversion(*this, From, ToType, ICS.UserDefined,
3272 // C++0x [over.best.ics]p10:
3390 // C++0x [over.ics.rank]p3b4:
3454 // C++ [over.ics.rank]p4b2:
3529 // C++ [over.ics.rank]p3b4:
3701 /// [over.ics.rank]p4b3). As part of these checks, we also look at
3725 // C++ [over.ics.rank]p4b3:
3989 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
4070 // C++ [over.ics.ref]p1:
4083 ICS.setUserDefined();
4084 ICS.UserDefined.Before = Best->Conversions[0].Standard;
4085 ICS.UserDefined.After = Best->FinalConversion;
4086 ICS.UserDefined.HadMultipleCandidates = HadMultipleCandidates;
4087 ICS.UserDefined.ConversionFunction = Best->Function;
4088 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
4089 ICS.UserDefined.EllipsisConversion = false;
4090 assert(ICS.UserDefined.After.ReferenceBinding &&
4091 ICS.UserDefined.After.DirectBinding &&
4096 ICS.setAmbiguous();
4100 ICS.Ambiguous.addConversion(Cand->Function);
4123 ImplicitConversionSequence ICS;
4124 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4159 // Per C++ [over.ics.ref]p4, we don't check the bit-field property here.
4162 // C++ [over.ics.ref]p1:
4169 ICS.setStandard();
4170 ICS.Standard.First = ICK_Identity;
4171 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4174 ICS.Standard.Third = ICK_Identity;
4175 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4176 ICS.Standard.setToType(0, T2);
4177 ICS.Standard.setToType(1, T1);
4178 ICS.Standard.setToType(2, T1);
4179 ICS.Standard.ReferenceBinding = true;
4180 ICS.Standard.DirectBinding = true;
4181 ICS.Standard.IsLvalueReference = !isRValRef;
4182 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4183 ICS.Standard.BindsToRvalue = false;
4184 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4185 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4186 ICS.Standard.CopyConstructor = 0;
4191 // [over.best.ics]p2).
4192 return ICS;
4205 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4208 return ICS;
4216 // We actually handle one oddity of C++ [over.ics.ref] at this
4226 return ICS;
4236 ICS.setStandard();
4237 ICS.Standard.First = ICK_Identity;
4238 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4241 ICS.Standard.Third = ICK_Identity;
4242 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4243 ICS.Standard.setToType(0, T2);
4244 ICS.Standard.setToType(1, T1);
4245 ICS.Standard.setToType(2, T1);
4246 ICS.Standard.ReferenceBinding = true;
4252 ICS.Standard.DirectBinding =
4255 ICS.Standard.IsLvalueReference = !isRValRef;
4256 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4257 ICS.Standard.BindsToRvalue = InitCategory.isRValue();
4258 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4259 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4260 ICS.Standard.CopyConstructor = 0;
4261 return ICS;
4276 FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4283 if (ICS.isUserDefined() && isRValRef &&
4284 ICS.UserDefined.After.First == ICK_Lvalue_To_Rvalue)
4285 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4287 return ICS;
4312 return ICS;
4322 return ICS;
4328 return ICS;
4330 // C++ [over.ics.ref]p2:
4340 ICS = TryImplicitConversion(S, Init, T1, SuppressUserConversions,
4347 if (ICS.isStandard()) {
4348 ICS.Standard.ReferenceBinding = true;
4349 ICS.Standard.IsLvalueReference = !isRValRef;
4350 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4351 ICS.Standard.BindsToRvalue = true;
4352 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4353 ICS.Standard.ObjCLifetimeConversionBinding = false;
4354 } else if (ICS.isUserDefined()) {
4358 = ICS
4361 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, Init,
4363 return ICS;
4368 ICS.UserDefined.After.ReferenceBinding = true;
4369 ICS.UserDefined.After.IsLvalueReference = !isRValRef;
4370 ICS.UserDefined.After.BindsToFunctionLvalue = T2->isFunctionType();
4371 ICS.UserDefined.After.BindsToRvalue = true;
4372 ICS.UserDefined.After.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4373 ICS.UserDefined.After.ObjCLifetimeConversionBinding = false;
4376 return ICS;
4393 // C++11 [over.ics.list]p1:
4406 // C++11 [over.ics.list]p2:
4420 ImplicitConversionSequence ICS =
4425 if (ICS.isBad()) {
4426 Result = ICS;
4431 CompareImplicitConversionSequences(S, ICS, Result) ==
4433 Result = ICS;
4450 // C++11 [over.ics.list]p3:
4466 // C++11 [over.ics.list]p4:
4492 // C++11 [over.ics.list]p5:
4560 // C++11 [over.ics.list]p6:
4584 // C++11 [over.ics.list]p7:
4625 ImplicitConversionSequence ICS =
4628 return !ICS.isBad();
4648 ImplicitConversionSequence ICS;
4684 ICS.setBad(BadConversionSequence::bad_qualifiers,
4686 return ICS;
4698 ICS.setBad(BadConversionSequence::unrelated_class,
4700 return ICS;
4712 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, FromType,
4714 return ICS;
4721 ICS.setBad(BadConversionSequence::rvalue_ref_to_lvalue, FromType,
4723 return ICS;
4729 ICS.setStandard();
4730 ICS.Standard.setAsIdentityConversion();
4731 ICS.Standard.Second = SecondKind;
4732 ICS.Standard.setFromType(FromType);
4733 ICS.Standard.setAllToTypes(ImplicitParamType);
4734 ICS.Standard.ReferenceBinding = true;
4735 ICS.Standard.DirectBinding = true;
4736 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
4737 ICS.Standard.BindsToFunctionLvalue = false;
4738 ICS.Standard.BindsToRvalue = FromClassification.isRValue();
4739 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier
4741 return ICS;
4769 ImplicitConversionSequence ICS
4772 if (ICS.isBad()) {
4773 if (ICS.Bad.Kind == BadConversionSequence::bad_qualifiers) {
4793 if (ICS.Standard.Second == ICK_Derived_To_Base) {
4827 ImplicitConversionSequence ICS = TryContextuallyConvertToBool(*this, From);
4828 if (!ICS.isBad())
4829 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
4910 ImplicitConversionSequence ICS =
4918 switch (ICS.getKind()) {
4920 if (!CheckConvertedConstantConversions(*this, ICS.Standard))
4924 SCS = &ICS.Standard;
4929 if (!CheckConvertedConstantConversions(*this, ICS.UserDefined.After))
4933 SCS = &ICS.UserDefined.After;
4947 ExprResult Result = PerformImplicitConversion(From, T, ICS, AA_Converting);
5026 ImplicitConversionSequence ICS
5036 switch (ICS.getKind()) {
5043 dropPointerConversion(ICS.UserDefined.After);
5047 dropPointerConversion(ICS.Standard);
5051 return ICS;
5061 ImplicitConversionSequence ICS =
5063 if (!ICS.isBad())
5064 return PerformImplicitConversion(From, Ty, ICS, AA_Converting);
5872 // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user]
5912 ImplicitConversionSequence ICS =
5918 switch (ICS.getKind()) {
5920 Candidate.FinalConversion = ICS.Standard;
5922 // C++ [over.ics.user]p3:
5927 GetConversionRank(ICS.Standard.Second) != ICR_Exact_Match) {
5938 ICS.Standard.First == ICK_Lvalue_To_Rvalue) {
8836 const ImplicitConversionSequence &ICS = Cand->Conversions[ArgIdx];
8837 if (ICS.isBad()) break; // all meaningless after first invalid
8838 if (!ICS.isAmbiguous()) continue;
8840 ICS.DiagnoseAmbiguousConversion(S, OpLoc,
9398 // compatible pointer-to-function arguments that would be adjusted by ICS.