Unconfuse gcc5.3 after 2e204e2391 / D87528

The local variable CmpResult added in that change shadowed the
type CmpResult, which confused an older gcc. Rename the variable
CmpResult to APFloatCmpResult.
This commit is contained in:
Nico Weber 2020-10-26 12:55:33 -04:00
parent 5b742a0c10
commit c686dfd617
1 changed files with 3 additions and 3 deletions

View File

@ -12561,16 +12561,16 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E,
return false;
assert(E->isComparisonOp() && "Invalid binary operator!");
llvm::APFloatBase::cmpResult CmpResult = LHS.compare(RHS);
llvm::APFloatBase::cmpResult APFloatCmpResult = LHS.compare(RHS);
if (!Info.InConstantContext &&
CmpResult == APFloat::cmpUnordered &&
APFloatCmpResult == APFloat::cmpUnordered &&
E->getFPFeaturesInEffect(Info.Ctx.getLangOpts()).isFPConstrained()) {
// Note: Compares may raise invalid in some cases involving NaN or sNaN.
Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);
return false;
}
auto GetCmpRes = [&]() {
switch (CmpResult) {
switch (APFloatCmpResult) {
case APFloat::cmpEqual:
return CmpResult::Equal;
case APFloat::cmpLessThan: