Crash invoking a @body argument with the wrong number of parameters.

This commit is contained in:
Christoffer Lerno
2024-09-17 00:33:38 +02:00
parent 62887a6ce8
commit 08a575fa82
2 changed files with 2 additions and 0 deletions

View File

@@ -2374,6 +2374,7 @@ static bool sema_call_analyse_body_expansion(SemaContext *macro_context, Expr *c
if (expressions != vec_size(body_parameters))
{
PRINT_ERROR_AT(call, "Expected %d parameter(s) to %s.", vec_size(body_parameters), body_decl->name);
return false;
}
Expr **args = call_expr->arguments;