Home | History | Annotate | Download | only in Sema

Lines Matching refs:ICS

1113   ImplicitConversionSequence ICS;
1118 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1119 return ICS;
1125 = IsUserDefinedConversion(S, From, ToType, ICS.UserDefined, Conversions,
1129 ICS.setUserDefined();
1130 // C++ [over.ics.user]p4:
1138 = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {
1147 ICS.setStandard();
1148 ICS.Standard.setAsIdentityConversion();
1149 ICS.Standard.setFromType(From->getType());
1150 ICS.Standard.setAllToTypes(ToType);
1151 ICS.Standard.CopyConstructor = Constructor;
1153 ICS.Standard.Second = ICK_Derived_To_Base;
1157 // C++ [over.best.ics]p4:
1164 if (SuppressUserConversions && ICS.isUserDefined()) {
1165 ICS.setBad(BadConversionSequence::suppressed_user, From, ToType);
1168 ICS.setAmbiguous();
1169 ICS.Ambiguous.setFromType(From->getType());
1170 ICS.Ambiguous.setToType(ToType);
1174 ICS.Ambiguous.addConversion(Cand->Function);
1176 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1179 return ICS;
1216 ImplicitConversionSequence ICS;
1218 ICS.Standard, CStyle, AllowObjCWritebackConversion)){
1219 ICS.setStandard();
1220 return ICS;
1224 ICS.setBad(BadConversionSequence::no_conversion, From, ToType);
1225 return ICS;
1228 // C++ [over.ics.user]p4:
1239 ICS.setStandard();
1240 ICS.Standard.setAsIdentityConversion();
1241 ICS.Standard.setFromType(FromType);
1242 ICS.Standard.setAllToTypes(ToType);
1248 ICS.Standard.CopyConstructor = 0;
1252 ICS.Standard.Second = ICK_Derived_To_Base;
1254 return ICS;
1283 ImplicitConversionSequence ICS;
1284 return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
1290 ImplicitConversionSequence& ICS) {
1299 ICS = clang::TryImplicitConversion(*this, From, ToType,
1305 return PerformImplicitConversion(From, ToType, ICS, Action);
1408 /// conversion sequence (C++ [conv], C++ [over.ics.scs]) from the
1670 // C++ [over.best.ics]p6:
3018 /// (C++ [over.ics.user]) that converts expression From to the type
3175 // C++ [over.ics.user]p1:
3203 // C++ [over.ics.user]p1:
3215 // C++ [over.ics.user]p2:
3244 ImplicitConversionSequence ICS;
3247 IsUserDefinedConversion(*this, From, ToType, ICS.UserDefined,
3315 // C++0x [over.best.ics]p10:
3433 // C++0x [over.ics.rank]p3b4:
3497 // C++ [over.ics.rank]p4b2:
3572 // C++ [over.ics.rank]p3b4:
3744 /// [over.ics.rank]p4b3). As part of these checks, we also look at
3768 // C++ [over.ics.rank]p4b3:
4022 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
4103 // C++ [over.ics.ref]p1:
4116 ICS.setUserDefined();
4117 ICS.UserDefined.Before = Best->Conversions[0].Standard;
4118 ICS.UserDefined.After = Best->FinalConversion;
4119 ICS.UserDefined.HadMultipleCandidates = HadMultipleCandidates;
4120 ICS.UserDefined.ConversionFunction = Best->Function;
4121 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
4122 ICS.UserDefined.EllipsisConversion = false;
4123 assert(ICS.UserDefined.After.ReferenceBinding &&
4124 ICS.UserDefined.After.DirectBinding &&
4129 ICS.setAmbiguous();
4133 ICS.Ambiguous.addConversion(Cand->Function);
4156 ImplicitConversionSequence ICS;
4157 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4192 // Per C++ [over.ics.ref]p4, we don't check the bit-field property here.
4195 // C++ [over.ics.ref]p1:
4202 ICS.setStandard();
4203 ICS.Standard.First = ICK_Identity;
4204 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4207 ICS.Standard.Third = ICK_Identity;
4208 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4209 ICS.Standard.setToType(0, T2);
4210 ICS.Standard.setToType(1, T1);
4211 ICS.Standard.setToType(2, T1);
4212 ICS.Standard.ReferenceBinding = true;
4213 ICS.Standard.DirectBinding = true;
4214 ICS.Standard.IsLvalueReference = !isRValRef;
4215 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4216 ICS.Standard.BindsToRvalue = false;
4217 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4218 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4219 ICS.Standard.CopyConstructor = 0;
4224 // [over.best.ics]p2).
4225 return ICS;
4238 if (FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4241 return ICS;
4249 // We actually handle one oddity of C++ [over.ics.ref] at this
4259 return ICS;
4269 ICS.setStandard();
4270 ICS.Standard.First = ICK_Identity;
4271 ICS.Standard.Second = DerivedToBase? ICK_Derived_To_Base
4274 ICS.Standard.Third = ICK_Identity;
4275 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4276 ICS.Standard.setToType(0, T2);
4277 ICS.Standard.setToType(1, T1);
4278 ICS.Standard.setToType(2, T1);
4279 ICS.Standard.ReferenceBinding = true;
4285 ICS.Standard.DirectBinding =
4288 ICS.Standard.IsLvalueReference = !isRValRef;
4289 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4290 ICS.Standard.BindsToRvalue = InitCategory.isRValue();
4291 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4292 ICS.Standard.ObjCLifetimeConversionBinding = ObjCLifetimeConversion;
4293 ICS.Standard.CopyConstructor = 0;
4294 return ICS;
4309 FindConversionForRefInit(S, ICS, DeclType, DeclLoc,
4316 if (ICS.isUserDefined() && isRValRef &&
4317 ICS.UserDefined.After.First == ICK_Lvalue_To_Rvalue)
4318 ICS.setBad(BadConversionSequence::no_conversion, Init, DeclType);
4320 return ICS;
4345 return ICS;
4355 return ICS;
4361 return ICS;
4363 // C++ [over.ics.ref]p2:
4373 ICS = TryImplicitConversion(S, Init, T1, SuppressUserConversions,
4380 if (ICS.isStandard()) {
4381 ICS.Standard.ReferenceBinding = true;
4382 ICS.Standard.IsLvalueReference = !isRValRef;
4383 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4384 ICS.Standard.BindsToRvalue = true;
4385 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4386 ICS.Standard.ObjCLifetimeConversionBinding = false;
4387 } else if (ICS.isUserDefined()) {
4391 = ICS.UserDefined.ConversionFunction->getResultType()
4394 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, Init,
4396 return ICS;
4401 ICS.UserDefined.After.ReferenceBinding = true;
4402 ICS.UserDefined.After.IsLvalueReference = !isRValRef;
4403 ICS.UserDefined.After.BindsToFunctionLvalue = T2->isFunctionType();
4404 ICS.UserDefined.After.BindsToRvalue = true;
4405 ICS.UserDefined.After.BindsImplicitObjectArgumentWithoutRefQualifier = false;
4406 ICS.UserDefined.After.ObjCLifetimeConversionBinding = false;
4409 return ICS;
4426 // C++11 [over.ics.list]p1:
4439 // C++11 [over.ics.list]p2:
4453 ImplicitConversionSequence ICS =
4458 if (ICS.isBad()) {
4459 Result = ICS;
4464 CompareImplicitConversionSequences(S, ICS, Result) ==
4466 Result = ICS;
4483 // C++11 [over.ics.list]p3:
4499 // C++11 [over.ics.list]p4:
4525 // C++11 [over.ics.list]p5:
4593 // C++11 [over.ics.list]p6:
4617 // C++11 [over.ics.list]p7:
4658 ImplicitConversionSequence ICS =
4661 return !ICS.isBad();
4681 ImplicitConversionSequence ICS;
4717 ICS.setBad(BadConversionSequence::bad_qualifiers,
4719 return ICS;
4731 ICS.setBad(BadConversionSequence::unrelated_class,
4733 return ICS;
4745 ICS.setBad(BadConversionSequence::lvalue_ref_to_rvalue, FromType,
4747 return ICS;
4754 ICS.setBad(BadConversionSequence::rvalue_ref_to_lvalue, FromType,
4756 return ICS;
4762 ICS.setStandard();
4763 ICS.Standard.setAsIdentityConversion();
4764 ICS.Standard.Second = SecondKind;
4765 ICS.Standard.setFromType(FromType);
4766 ICS.Standard.setAllToTypes(ImplicitParamType);
4767 ICS.Standard.ReferenceBinding = true;
4768 ICS.Standard.DirectBinding = true;
4769 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
4770 ICS.Standard.BindsToFunctionLvalue = false;
4771 ICS.Standard.BindsToRvalue = FromClassification.isRValue();
4772 ICS.Standard.BindsImplicitObjectArgumentWithoutRefQualifier
4774 return ICS;
4802 ImplicitConversionSequence ICS
4805 if (ICS.isBad()) {
4806 if (ICS.Bad.Kind == BadConversionSequence::bad_qualifiers) {
4826 if (ICS.Standard.Second == ICK_Derived_To_Base) {
4860 ImplicitConversionSequence ICS = TryContextuallyConvertToBool(*this, From);
4861 if (!ICS.isBad())
4862 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
4943 ImplicitConversionSequence ICS =
4951 switch (ICS.getKind()) {
4953 if (!CheckConvertedConstantConversions(*this, ICS.Standard))
4957 SCS = &ICS.Standard;
4962 if (!CheckConvertedConstantConversions(*this, ICS.UserDefined.After))
4966 SCS = &ICS.UserDefined.After;
4980 ExprResult Result = PerformImplicitConversion(From, T, ICS, AA_Converting);
5059 ImplicitConversionSequence ICS
5069 switch (ICS.getKind()) {
5076 dropPointerConversion(ICS.UserDefined.After);
5080 dropPointerConversion(ICS.Standard);
5084 return ICS;
5094 ImplicitConversionSequence ICS =
5096 if (!ICS.isBad())
5097 return PerformImplicitConversion(From, Ty, ICS, AA_Converting);
5754 // go through a copy constructor. 13.3.3.1.2-p4 [over.ics.user]
5794 ImplicitConversionSequence ICS =
5800 switch (ICS.getKind()) {
5802 Candidate.FinalConversion = ICS.Standard;
5804 // C++ [over.ics.user]p3:
5809 GetConversionRank(ICS.Standard.Second) != ICR_Exact_Match) {
5820 ICS.Standard.First == ICK_Lvalue_To_Rvalue) {
8654 const ImplicitConversionSequence &ICS = Cand->Conversions[ArgIdx];
8655 if (ICS.isBad()) break; // all meaningless after first invalid
8656 if (!ICS.isAmbiguous()) continue;
8658 ICS.DiagnoseAmbiguousConversion(S, OpLoc,