Home | History | Annotate | Download | only in Sema

Lines Matching defs:ICS

1184   ImplicitConversionSequence ICS;
1189 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1190 return ICS;
1196 switch (IsUserDefinedConversion(S, From, ToType, ICS.UserDefined,
1201 ICS.setUserDefined();
1202 ICS.UserDefined.Before.setAsIdentityConversion();
1203 // C++ [over.ics.user]p4:
1211 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
1221 DeclAccessPair Found = ICS.UserDefined.FoundConversionFunction;
1222 ICS.setStandard();
1223 ICS.Standard.setAsIdentityConversion();
1224 ICS.Standard.setFromType(From->getType());
1225 ICS.Standard.setAllToTypes(ToType);
1226 ICS.Standard.CopyConstructor = Constructor;
1227 ICS.Standard.FoundCopyConstructor = Found;
1229 ICS.Standard.Second = ICK_Derived_To_Base;
1235 ICS.setAmbiguous();
1236 ICS.Ambiguous.setFromType(From->getType());
1237 ICS.Ambiguous.setToType(ToType);
1241 ICS.Ambiguous.addConversion(Cand->FoundDecl, Cand->Function);
1246 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1250 return ICS;
1288 ImplicitConversionSequence ICS;
1290 ICS.Standard, CStyle, AllowObjCWritebackConversion)){
1291 ICS.setStandard();
1292 return ICS;
1296 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1297 return ICS;
1300 // C++ [over.ics.user]p4:
1311 ICS.setStandard();
1312 ICS.Standard.setAsIdentityConversion();
1313 ICS.Standard.setFromType(FromType);
1314 ICS.Standard.setAllToTypes(ToType);
1320 ICS.Standard.CopyConstructor = nullptr;
1324 ICS.Standard.Second = ICK_Derived_To_Base;
1326 return ICS;
1357 ImplicitConversionSequence ICS;
1358 return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
1364 ImplicitConversionSequence& ICS) {
1375 ICS = ::TryImplicitConversion(*this, From, ToType,
1382 return PerformImplicitConversion(From, ToType, ICS, Action);
1484 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1762 // C++ [over.best.ics]p6:
3111 /// (C++ [over.ics.user]) that converts expression From to the type
3262 ics.user]p1:
3290 // C++ [over.ics.user]p1:
3302 // C++ [over.ics.user]p2:
3328 ImplicitConversionSequence ICS;
3332 IsUserDefinedConversion(*this, From, ToType, ICS.UserDefined,
3384 const ImplicitConversionSequence &ICS) {
3385 return (ICS.isStandard() && ICS.Standard.DeprecatedStringLiteralToCharPtr) ||
3386 (ICS.isUserDefined() &&
3387 ICS.UserDefined.Before.DeprecatedStringLiteralToCharPtr);
3407 // C++0x [over.best.ics]p10:
3556 // C++0x [over.ics.rank]p3b4:
3620 // C++ [over.ics.rank]p4b2:
3695 // C++ [over.ics.rank]p3b4:
3866 /// [over.ics.rank]p4b3). As part of these checks, we also look at
3890 // C++ [over.ics.rank]p4b3:
4160 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
4240 // C++ [over.ics.ref]p1:
4253 ICS.setUserDefined();
4254 ICS.UserDefined.Before = Best->Conversions[0].Standard;
4255 ICS.UserDefined.After = Best->FinalConversion;
4256 ICS.UserDefined.HadMultipleCandidates = HadMultipleCandidates;
4257 ICS.UserDefined.ConversionFunction = Best->Function;
4258 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
4259 ICS.UserDefined.EllipsisConversion = false;
4260 assert(ICS.UserDefined.After.ReferenceBinding &&
4261 ICS.UserDefined.After.DirectBinding &&
4266 ICS.setAmbiguous();
4270 ICS.Ambiguous.addConversion(Cand->FoundDecl, Cand->Function);
4293 ImplicitConversionSequence ICS;
4294 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4329 // Per C++ [over.ics.ref]p4, we don't check the bit-field property here.
4332 // C++ [over.ics.ref]p1:
4339 ICS.setStandard();
4340 ICS.Standard.First = ICK_Identity;
4341 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4344 ICS.Standard.Third = ICK_Identity;
4345 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4346 ICS.Standard.setToType(0, T2);
4347 ICS.Standard.setToType(1, T1);
4348 ICS.Standard.setToType(2, T1);
4349 ICS.Standard.ReferenceBinding = true;
4350 ICS.Standard.DirectBinding = true;
4351 ICS.Standard.IsLvalueReference = !isRValRef;
4352 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4353 ICS.Standard.BindsToRvalue = false;
4354 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4355 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4356 ICS.Standard.CopyConstructor = nullptr;
4357 ICS.Standard.DeprecatedStringLiteralToCharPtr = false;
4362 ics]p2).
4363 return ICS;
4376 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4379 return ICS;
4387 return ICS;
4397 ICS.setStandard();
4398 ICS.Standard.First = ICK_Identity;
4399 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4402 ICS.Standard.Third = ICK_Identity;
4403 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4404 ICS.Standard.setToType(0, T2);
4405 ICS.Standard.setToType(1, T1);
4406 ICS.Standard.setToType(2, T1);
4407 ICS.Standard.ReferenceBinding = true;
4413 ICS.Standard.DirectBinding =
4416 ICS.Standard.IsLvalueReference = !isRValRef;
4417 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4418 ICS.Standard.BindsToRvalue = InitCategory.isRValue();
4419 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4420 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4421 ICS.Standard.CopyConstructor = nullptr;
4422 ICS.Standard.DeprecatedStringLiteralToCharPtr = false;
4423 return ICS;
4438 FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4445 if (ICS.isUserDefined() && isRValRef &&
4446 ICS.UserDefined.After.First == ICK_Lvalue_To_Rvalue)
4447 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4449 return ICS;
4454 return ICS;
4481 return ICS;
4491 return ICS;
4497 return ICS;
4499 // C++ [over.ics.ref]p2:
4509 ICS = TryImplicitConversion(S, Init, T1, SuppressUserConversions,
4517 if (ICS.isStandard()) {
4518 ICS.Standard.ReferenceBinding = true;
4519 ICS.Standard.IsLvalueReference = !isRValRef;
4520 ICS.Standard.BindsToFunctionLvalue = false;
4521 ICS.Standard.BindsToRvalue = true;
4522 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4523 ICS.Standard.ObjCLifetimeConversionBinding = false;
4524 } else if (ICS.isUserDefined()) {
4526 ICS.UserDefined.ConversionFunction->getReturnType()
4529 // C++ [over.ics.ref]p3:
4539 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, Init, DeclType);
4540 return ICS;
4543 ICS.UserDefined.Before.setAsIdentityConversion();
4544 ICS.UserDefined.After.ReferenceBinding = true;
4545 ICS.UserDefined.After.IsLvalueReference = !isRValRef;
4546 ICS.UserDefined.After.BindsToFunctionLvalue = false;
4547 ICS.UserDefined.After.BindsToRvalue = !LValRefType;
4548 ICS.UserDefined.After.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4549 ICS.UserDefined.After.ObjCLifetimeConversionBinding = false;
4552 return ICS;
4569 // C++11 [over.ics.list]p1:
4617 // C++14 [over.ics.list]p2: Otherwise, if the parameter type [...] (below).
4618 // C++11 [over.ics.list]p2:
4624 // C++14 [over.ics.list]p3:
4641 ImplicitConversionSequence ICS =
4646 if (ICS.isBad()) {
4647 Result = ICS;
4652 CompareImplicitConversionSequences(S, From->getLocStart(), ICS,
4655 Result = ICS;
4671 // C++14 [over.ics.list]p4:
4672 // C++11 [over.ics.list]p3:
4687 // C++14 [over.ics.list]p5:
4688 // C++11 [over.ics.list]p4:
4714 // C++14 [over.ics.list]p6:
4715 // C++11 [over.ics.list]p5:
4783 // C++14 [over.ics.list]p7:
4784 // C++11 [over.ics.list]p6:
4807 // C++14 [over.ics.list]p8:
4808 // C++11 [over.ics.list]p7:
4850 ImplicitConversionSequence ICS =
4853 return !ICS.isBad();
4873 ImplicitConversionSequence ICS;
4909 ICS.setBad(BadConversionSequence::bad_qualifiers,
4911 return ICS;
4923 ICS.setBad(BadConversionSequence::unrelated_class,
4925 return ICS;
4937 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, FromType,
4939 return ICS;
4946 ICS.setBad(BadConversionSequence::rvalue_ref_to_lvalue, FromType,
4948 return ICS;
4954 ICS.setStandard();
4955 ICS.Standard.setAsIdentityConversion();
4956 ICS.Standard.Second = SecondKind;
4957 ICS.Standard.setFromType(FromType);
4958 ICS.Standard.setAllToTypes(ImplicitParamType);
4959 ICS.Standard.ReferenceBinding = true;
4960 ICS.Standard.DirectBinding = true;
4961 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
4962 ICS.Standard.BindsToFunctionLvalue = false;
4963 ICS.Standard.BindsToRvalue = FromClassification.isRValue();
4964 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier
4966 return ICS;
4994 ImplicitConversionSequence ICS = TryObjectArgumentInitialization(
4997 if (ICS.isBad()) {
4998 if (ICS.Bad.Kind == BadConversionSequence::bad_qualifiers) {
5018 if (ICS.Standard.Second == ICK_Derived_To_Base) {
5051 ImplicitConversionSequence ICS = TryContextuallyConvertToBool(*this, From);
5052 if (!ICS.isBad())
5053 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
5144 ImplicitConversionSequence ICS =
5151 switch (ICS.getKind()) {
5153 SCS = &ICS.Standard;
5158 SCS = &ICS.UserDefined.After;
5186 S.PerformImplicitConversion(From, T, ICS, Sema::AA_Converting);
5282 ImplicitConversionSequence ICS
5293 switch (ICS.getKind()) {
5300 dropPointerConversion(ICS.UserDefined.After);
5304 dropPointerConversion(ICS.Standard);
5308 return ICS;
5318 ImplicitConversionSequence ICS =
5320 if (!ICS.isBad())
5321 return PerformImplicitConversion(From, Ty, ICS, AA_Converting);
6455 // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user]
6496 ImplicitConversionSequence ICS =
6502 switch (ICS.getKind()) {
6504 Candidate.FinalConversion = ICS.Standard;
6506 // C++ [over.ics.user]p3:
6511 GetConversionRank(ICS.Standard.Second) != ICR_Exact_Match) {
6523 ICS.Standard.First == ICK_Lvalue_To_Rvalue) {
9813 const ImplicitConversionSequence &ICS = Cand->Conversions[ArgIdx];
9814 if (ICS.isBad()) break; // all meaningless after first invalid
9815 if (!ICS.isAmbiguous()) continue;
9817 ICS.DiagnoseAmbiguousConversion(
10444 // compatible pointer-to-function arguments that would be adjusted by ICS.