Lines Matching defs:ICS
1122 ImplicitConversionSequence ICS;
1127 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1128 return ICS;
1135 = IsUserDefinedConversion(S, From, ToType, ICS.UserDefined, Conversions,
1139 ICS.setUserDefined();
1140 ICS.UserDefined.Before.setAsIdentityConversion();
1141 // C++ [over.ics.user]p4:
1149 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
1158 ICS.setStandard();
1159 ICS.Standard.setAsIdentityConversion();
1160 ICS.Standard.setFromType(From->getType());
1161 ICS.Standard.setAllToTypes(ToType);
1162 ICS.Standard.CopyConstructor = Constructor;
1164 ICS.Standard.Second = ICK_Derived_To_Base;
1168 // C++ [over.best.ics]p4:
1175 if (SuppressUserConversions && ICS.isUserDefined()) {
1176 ICS.setBad(BadConversionSequence::suppressed_user, From, ToType);
1179 ICS.setAmbiguous();
1180 ICS.Ambiguous.setFromType(From->getType());
1181 ICS.Ambiguous.setToType(ToType);
1185 ICS.Ambiguous.addConversion(Cand->Function);
1187 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1190 return ICS;
1228 ImplicitConversionSequence ICS;
1230 ICS.Standard, CStyle, AllowObjCWritebackConversion)){
1231 ICS.setStandard();
1232 return ICS;
1236 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1237 return ICS;
1240 // C++ [over.ics.user]p4:
1251 ICS.setStandard();
1252 ICS.Standard.setAsIdentityConversion();
1253 ICS.Standard.setFromType(FromType);
1254 ICS.Standard.setAllToTypes(ToType);
1260 ICS.Standard.CopyConstructor = nullptr;
1264 ICS.Standard.Second = ICK_Derived_To_Base;
1266 return ICS;
1297 ImplicitConversionSequence ICS;
1298 return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
1304 ImplicitConversionSequence& ICS) {
1315 ICS = clang::TryImplicitConversion(*this, From, ToType,
1322 return PerformImplicitConversion(From, ToType, ICS, Action);
1424 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1685 // C++ [over.best.ics]p6:
3014 /// (C++ [over.ics.user]) that converts expression From to the type
3180 // C++ [over.ics.user]p1:
3208 // C++ [over.ics.user]p1:
3220 // C++ [over.ics.user]p2:
3249 ImplicitConversionSequence ICS;
3253 IsUserDefinedConversion(*this, From, ToType, ICS.UserDefined,
3305 const ImplicitConversionSequence &ICS) {
3306 return (ICS.isStandard() && ICS.Standard.DeprecatedStringLiteralToCharPtr) ||
3307 (ICS.isUserDefined() &&
3308 ICS.UserDefined.Before.DeprecatedStringLiteralToCharPtr);
3328 // C++0x [over.best.ics]p10:
3470 // C++0x [over.ics.rank]p3b4:
3534 // C++ [over.ics.rank]p4b2:
3609 // C++ [over.ics.rank]p3b4:
3780 /// [over.ics.rank]p4b3). As part of these checks, we also look at
3804 // C++ [over.ics.rank]p4b3:
4070 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
4153 // C++ [over.ics.ref]p1:
4166 ICS.setUserDefined();
4167 ICS.UserDefined.Before = Best->Conversions[0].Standard;
4168 ICS.UserDefined.After = Best->FinalConversion;
4169 ICS.UserDefined.HadMultipleCandidates = HadMultipleCandidates;
4170 ICS.UserDefined.ConversionFunction = Best->Function;
4171 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
4172 ICS.UserDefined.EllipsisConversion = false;
4173 assert(ICS.UserDefined.After.ReferenceBinding &&
4174 ICS.UserDefined.After.DirectBinding &&
4179 ICS.setAmbiguous();
4183 ICS.Ambiguous.addConversion(Cand->Function);
4206 ImplicitConversionSequence ICS;
4207 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4242 // Per C++ [over.ics.ref]p4, we don't check the bit-field property here.
4245 // C++ [over.ics.ref]p1:
4252 ICS.setStandard();
4253 ICS.Standard.First = ICK_Identity;
4254 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4257 ICS.Standard.Third = ICK_Identity;
4258 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4259 ICS.Standard.setToType(0, T2);
4260 ICS.Standard.setToType(1, T1);
4261 ICS.Standard.setToType(2, T1);
4262 ICS.Standard.ReferenceBinding = true;
4263 ICS.Standard.DirectBinding = true;
4264 ICS.Standard.IsLvalueReference = !isRValRef;
4265 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4266 ICS.Standard.BindsToRvalue = false;
4267 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4268 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4269 ICS.Standard.CopyConstructor = nullptr;
4270 ICS.Standard.DeprecatedStringLiteralToCharPtr = false;
4275 // [over.best.ics]p2).
4276 return ICS;
4289 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4292 return ICS;
4300 // We actually handle one oddity of C++ [over.ics.ref] at this
4310 return ICS;
4320 ICS.setStandard();
4321 ICS.Standard.First = ICK_Identity;
4322 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4325 ICS.Standard.Third = ICK_Identity;
4326 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4327 ICS.Standard.setToType(0, T2);
4328 ICS.Standard.setToType(1, T1);
4329 ICS.Standard.setToType(2, T1);
4330 ICS.Standard.ReferenceBinding = true;
4336 ICS.Standard.DirectBinding =
4339 ICS.Standard.IsLvalueReference = !isRValRef;
4340 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4341 ICS.Standard.BindsToRvalue = InitCategory.isRValue();
4342 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4343 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4344 ICS.Standard.CopyConstructor = nullptr;
4345 ICS.Standard.DeprecatedStringLiteralToCharPtr = false;
4346 return ICS;
4361 FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4368 if (ICS.isUserDefined() && isRValRef &&
4369 ICS.UserDefined.After.First == ICK_Lvalue_To_Rvalue)
4370 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4372 return ICS;
4397 return ICS;
4407 return ICS;
4413 return ICS;
4415 // C++ [over.ics.ref]p2:
4425 ICS = TryImplicitConversion(S, Init, T1, SuppressUserConversions,
4433 if (ICS.isStandard()) {
4434 ICS.Standard.ReferenceBinding = true;
4435 ICS.Standard.IsLvalueReference = !isRValRef;
4436 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4437 ICS.Standard.BindsToRvalue = true;
4438 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4439 ICS.Standard.ObjCLifetimeConversionBinding = false;
4440 } else if (ICS.isUserDefined()) {
4444 ICS.UserDefined.ConversionFunction->getReturnType()
4447 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, Init,
4449 return ICS;
4453 ICS.UserDefined.Before.setAsIdentityConversion();
4454 ICS.UserDefined.After.ReferenceBinding = true;
4455 ICS.UserDefined.After.IsLvalueReference = !isRValRef;
4456 ICS.UserDefined.After.BindsToFunctionLvalue = T2->isFunctionType();
4457 ICS.UserDefined.After.BindsToRvalue = true;
4458 ICS.UserDefined.After.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4459 ICS.UserDefined.After.ObjCLifetimeConversionBinding = false;
4462 return ICS;
4479 // C++11 [over.ics.list]p1:
4491 // C++11 [over.ics.list]p2:
4505 ImplicitConversionSequence ICS =
4510 if (ICS.isBad()) {
4511 Result = ICS;
4516 CompareImplicitConversionSequences(S, ICS, Result) ==
4518 Result = ICS;
4534 // C++11 [over.ics.list]p3:
4549 // C++11 [over.ics.list]p4:
4575 // C++11 [over.ics.list]p5:
4643 // C++11 [over.ics.list]p6:
4666 // C++11 [over.ics.list]p7:
4708 ImplicitConversionSequence ICS =
4711 return !ICS.isBad();
4731 ImplicitConversionSequence ICS;
4767 ICS.setBad(BadConversionSequence::bad_qualifiers,
4769 return ICS;
4781 ICS.setBad(BadConversionSequence::unrelated_class,
4783 return ICS;
4795 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, FromType,
4797 return ICS;
4804 ICS.setBad(BadConversionSequence::rvalue_ref_to_lvalue, FromType,
4806 return ICS;
4812 ICS.setStandard();
4813 ICS.Standard.setAsIdentityConversion();
4814 ICS.Standard.Second = SecondKind;
4815 ICS.Standard.setFromType(FromType);
4816 ICS.Standard.setAllToTypes(ImplicitParamType);
4817 ICS.Standard.ReferenceBinding = true;
4818 ICS.Standard.DirectBinding = true;
4819 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
4820 ICS.Standard.BindsToFunctionLvalue = false;
4821 ICS.Standard.BindsToRvalue = FromClassification.isRValue();
4822 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier
4824 return ICS;
4852 ImplicitConversionSequence ICS
4855 if (ICS.isBad()) {
4856 if (ICS.Bad.Kind == BadConversionSequence::bad_qualifiers) {
4876 if (ICS.Standard.Second == ICK_Derived_To_Base) {
4909 ImplicitConversionSequence ICS = TryContextuallyConvertToBool(*this, From);
4910 if (!ICS.isBad())
4911 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
4992 ImplicitConversionSequence ICS =
5000 switch (ICS.getKind()) {
5002 if (!CheckConvertedConstantConversions(*this, ICS.Standard))
5006 SCS = &ICS.Standard;
5011 if (!CheckConvertedConstantConversions(*this, ICS.UserDefined.After))
5015 SCS = &ICS.UserDefined.After;
5029 ExprResult Result = PerformImplicitConversion(From, T, ICS, AA_Converting);
5104 ImplicitConversionSequence ICS
5115 switch (ICS.getKind()) {
5122 dropPointerConversion(ICS.UserDefined.After);
5126 dropPointerConversion(ICS.Standard);
5130 return ICS;
5140 ImplicitConversionSequence ICS =
5142 if (!ICS.isBad())
5143 return PerformImplicitConversion(From, Ty, ICS, AA_Converting);
6145 // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user]
6185 ImplicitConversionSequence ICS =
6191 switch (ICS.getKind()) {
6193 Candidate.FinalConversion = ICS.Standard;
6195 // C++ [over.ics.user]p3:
6200 GetConversionRank(ICS.Standard.Second) != ICR_Exact_Match) {
6212 ICS.Standard.First == ICK_Lvalue_To_Rvalue) {
9182 const ImplicitConversionSequence &ICS = Cand->Conversions[ArgIdx];
9183 if (ICS.isBad()) break; // all meaningless after first invalid
9184 if (!ICS.isAmbiguous()) continue;
9186 ICS.DiagnoseAmbiguousConversion(S, OpLoc,
9761 // compatible pointer-to-function arguments that would be adjusted by ICS.