switch (CandidateSet.BestViableFunction(Self, QuestionLoc, Best)) {
case OR_Success: {
// We found a match. Perform the conversions on the arguments and move on.
- ExprResult LHSRes =
- Self.PerformImplicitConversion(LHS.get(), Best->BuiltinTypes.ParamTypes[0],
- Best->Conversions[0], Sema::AA_Converting);
+ ExprResult LHSRes = Self.PerformImplicitConversion(
+ LHS.get(), Best->BuiltinParamTypes[0], Best->Conversions[0],
+ Sema::AA_Converting);
if (LHSRes.isInvalid())
break;
LHS = LHSRes;
- ExprResult RHSRes =
- Self.PerformImplicitConversion(RHS.get(), Best->BuiltinTypes.ParamTypes[1],
- Best->Conversions[1], Sema::AA_Converting);
+ ExprResult RHSRes = Self.PerformImplicitConversion(
+ RHS.get(), Best->BuiltinParamTypes[1], Best->Conversions[1],
+ Sema::AA_Converting);
if (RHSRes.isInvalid())
break;
RHS = RHSRes;
Candidate.Function = nullptr;
Candidate.IsSurrogate = false;
Candidate.IgnoreObjectArgument = false;
- for (unsigned ArgIdx = 0, N = Args.size(); ArgIdx != N; ++ArgIdx)
- Candidate.BuiltinTypes.ParamTypes[ArgIdx] = ParamTys[ArgIdx];
+ std::copy(ParamTys, ParamTys + Args.size(), Candidate.BuiltinParamTypes);
// Determine the implicit conversion sequences for each of the
// arguments.
std::string TypeStr("operator");
TypeStr += Opc;
TypeStr += "(";
- TypeStr += Cand->BuiltinTypes.ParamTypes[0].getAsString();
+ TypeStr += Cand->BuiltinParamTypes[0].getAsString();
if (Cand->Conversions.size() == 1) {
TypeStr += ")";
S.Diag(OpLoc, diag::note_ovl_builtin_unary_candidate) << TypeStr;
} else {
TypeStr += ", ";
- TypeStr += Cand->BuiltinTypes.ParamTypes[1].getAsString();
+ TypeStr += Cand->BuiltinParamTypes[1].getAsString();
TypeStr += ")";
S.Diag(OpLoc, diag::note_ovl_builtin_binary_candidate) << TypeStr;
}
} else {
// Builtin operator.
assert(ConvCount <= 3);
- ParamTypes = Cand->BuiltinTypes.ParamTypes;
+ ParamTypes = Cand->BuiltinParamTypes;
}
// Fill in the rest of the conversions.
// We matched a built-in operator. Convert the arguments, then
// break out so that we will build the appropriate built-in
// operator node.
- ExprResult InputRes =
- PerformImplicitConversion(Input, Best->BuiltinTypes.ParamTypes[0],
- Best->Conversions[0], AA_Passing);
+ ExprResult InputRes = PerformImplicitConversion(
+ Input, Best->BuiltinParamTypes[0], Best->Conversions[0], AA_Passing);
if (InputRes.isInvalid())
return ExprError();
Input = InputRes.get();
// break out so that we will build the appropriate built-in
// operator node.
ExprResult ArgsRes0 =
- PerformImplicitConversion(Args[0], Best->BuiltinTypes.ParamTypes[0],
- Best->Conversions[0], AA_Passing);
+ PerformImplicitConversion(Args[0], Best->BuiltinParamTypes[0],
+ Best->Conversions[0], AA_Passing);
if (ArgsRes0.isInvalid())
return ExprError();
Args[0] = ArgsRes0.get();
ExprResult ArgsRes1 =
- PerformImplicitConversion(Args[1], Best->BuiltinTypes.ParamTypes[1],
- Best->Conversions[1], AA_Passing);
+ PerformImplicitConversion(Args[1], Best->BuiltinParamTypes[1],
+ Best->Conversions[1], AA_Passing);
if (ArgsRes1.isInvalid())
return ExprError();
Args[1] = ArgsRes1.get();
// break out so that we will build the appropriate built-in
// operator node.
ExprResult ArgsRes0 =
- PerformImplicitConversion(Args[0], Best->BuiltinTypes.ParamTypes[0],
- Best->Conversions[0], AA_Passing);
+ PerformImplicitConversion(Args[0], Best->BuiltinParamTypes[0],
+ Best->Conversions[0], AA_Passing);
if (ArgsRes0.isInvalid())
return ExprError();
Args[0] = ArgsRes0.get();
ExprResult ArgsRes1 =
- PerformImplicitConversion(Args[1], Best->BuiltinTypes.ParamTypes[1],
- Best->Conversions[1], AA_Passing);
+ PerformImplicitConversion(Args[1], Best->BuiltinParamTypes[1],
+ Best->Conversions[1], AA_Passing);
if (ArgsRes1.isInvalid())
return ExprError();
Args[1] = ArgsRes1.get();