Eliminate the ForceRValue parameter from TryCopyInitialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101498 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 84c0bb5..1c85896 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -2506,7 +2506,7 @@
/// then we treat @p From as an rvalue, even if it is an lvalue.
static ImplicitConversionSequence
TryCopyInitialization(Sema &S, Expr *From, QualType ToType,
- bool SuppressUserConversions, bool ForceRValue,
+ bool SuppressUserConversions,
bool InOverloadResolution) {
if (ToType->isReferenceType())
return TryReferenceInit(S, From, ToType,
@@ -2517,7 +2517,7 @@
return S.TryImplicitConversion(From, ToType,
SuppressUserConversions,
/*AllowExplicit=*/false,
- ForceRValue,
+ /*ForceRValue=*/false,
InOverloadResolution);
}
@@ -2760,7 +2760,6 @@
Candidate.Conversions[ArgIdx]
= TryCopyInitialization(*this, Args[ArgIdx], ParamType,
SuppressUserConversions,
- /*ForceRValue=*/false,
/*InOverloadResolution=*/true);
if (Candidate.Conversions[ArgIdx].isBad()) {
Candidate.Viable = false;
@@ -2927,7 +2926,6 @@
Candidate.Conversions[ArgIdx + 1]
= TryCopyInitialization(*this, Args[ArgIdx], ParamType,
SuppressUserConversions,
- /*ForceRValue=*/false,
/*InOverloadResolution=*/true);
if (Candidate.Conversions[ArgIdx + 1].isBad()) {
Candidate.Viable = false;
@@ -3123,7 +3121,6 @@
ImplicitConversionSequence ICS =
TryCopyInitialization(*this, &Call, ToType,
/*SuppressUserConversions=*/true,
- /*ForceRValue=*/false,
/*InOverloadResolution=*/false);
switch (ICS.getKind()) {
@@ -3271,7 +3268,6 @@
Candidate.Conversions[ArgIdx + 1]
= TryCopyInitialization(*this, Args[ArgIdx], ParamType,
/*SuppressUserConversions=*/false,
- /*ForceRValue=*/false,
/*InOverloadResolution=*/false);
if (Candidate.Conversions[ArgIdx + 1].isBad()) {
Candidate.Viable = false;
@@ -3415,7 +3411,6 @@
Candidate.Conversions[ArgIdx]
= TryCopyInitialization(*this, Args[ArgIdx], ParamTys[ArgIdx],
ArgIdx == 0 && IsAssignmentOperator,
- /*ForceRValue=*/false,
/*InOverloadResolution=*/false);
}
if (Candidate.Conversions[ArgIdx].isBad()) {
@@ -5172,7 +5167,6 @@
= TryCopyInitialization(S, Args[ConvIdx],
Cand->BuiltinTypes.ParamTypes[ConvIdx],
SuppressUserConversions,
- /*ForceRValue=*/false,
/*InOverloadResolution*/ true);
return;
}
@@ -5184,7 +5178,6 @@
Cand->Conversions[ConvIdx]
= TryCopyInitialization(S, Args[ArgIdx], Proto->getArgType(ArgIdx),
SuppressUserConversions,
- /*ForceRValue=*/false,
/*InOverloadResolution=*/true);
else
Cand->Conversions[ConvIdx].setEllipsis();