diff --git a/flang/lib/Evaluate/fold-implementation.h b/flang/lib/Evaluate/fold-implementation.h --- a/flang/lib/Evaluate/fold-implementation.h +++ b/flang/lib/Evaluate/fold-implementation.h @@ -1185,12 +1185,12 @@ auto &convert{msvcWorkaround.convert}; char buffer[64]; if (auto value{GetScalarConstantValue(kindExpr)}) { - FoldingContext &context{msvcWorkaround.context}; + FoldingContext &ctx{msvcWorkaround.context}; if constexpr (TO::category == TypeCategory::Integer) { if constexpr (Operand::category == TypeCategory::Integer) { auto converted{Scalar::ConvertSigned(*value)}; if (converted.overflow) { - context.messages().Say( + ctx.messages().Say( "INTEGER(%d) to INTEGER(%d) conversion overflowed"_en_US, Operand::kind, TO::kind); } @@ -1198,11 +1198,11 @@ } else if constexpr (Operand::category == TypeCategory::Real) { auto converted{value->template ToInteger>()}; if (converted.flags.test(RealFlag::InvalidArgument)) { - context.messages().Say( + ctx.messages().Say( "REAL(%d) to INTEGER(%d) conversion: invalid argument"_en_US, Operand::kind, TO::kind); } else if (converted.flags.test(RealFlag::Overflow)) { - context.messages().Say( + ctx.messages().Say( "REAL(%d) to INTEGER(%d) conversion overflowed"_en_US, Operand::kind, TO::kind); } @@ -1215,7 +1215,7 @@ std::snprintf(buffer, sizeof buffer, "INTEGER(%d) to REAL(%d) conversion", Operand::kind, TO::kind); - RealFlagWarnings(context, converted.flags, buffer); + RealFlagWarnings(ctx, converted.flags, buffer); } return ScalarConstantToExpr(std::move(converted.value)); } else if constexpr (Operand::category == TypeCategory::Real) { @@ -1223,9 +1223,9 @@ if (!converted.flags.empty()) { std::snprintf(buffer, sizeof buffer, "REAL(%d) to REAL(%d) conversion", Operand::kind, TO::kind); - RealFlagWarnings(context, converted.flags, buffer); + RealFlagWarnings(ctx, converted.flags, buffer); } - if (context.flushSubnormalsToZero()) { + if (ctx.flushSubnormalsToZero()) { converted.value = converted.value.FlushSubnormalToZero(); } return ScalarConstantToExpr(std::move(converted.value));