Fix text in error message.

This commit is contained in:
Christoffer Lerno
2026-02-24 19:07:38 +01:00
parent f1d03c194f
commit 56a11ae3ca

View File

@@ -8206,7 +8206,7 @@ static bool sema_expr_analyse_div(SemaContext *context, Expr *expr, Expr *left,
if (!sema_convert_denominator_to_unsigned_if_needed(context, left, right)) if (!sema_convert_denominator_to_unsigned_if_needed(context, left, right))
{ {
if (failed_ref) return *failed_ref = true, false; if (failed_ref) return *failed_ref = true, false;
RETURN_SEMA_ERROR(expr, "Cannot implicitly divide an unsigned integer by an non-const signed integer, please use explicit casts."); RETURN_SEMA_ERROR(expr, "Cannot implicitly divide an unsigned integer by a non-const or negative signed integer, please use explicit casts.");
} }
if (!sema_binary_analyse_arithmetic_subexpr(context, expr, "Cannot divide %s by %s.", false, &overload, failed_ref)) return false; if (!sema_binary_analyse_arithmetic_subexpr(context, expr, "Cannot divide %s by %s.", false, &overload, failed_ref)) return false;
if (!overload) return true; if (!overload) return true;