mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[qfcc] Remove strange split in function arg handling
I don't know why the last argument was handled differently. I suspect it was a hold-over from before I added list handling. Removing it seems to have made no significant difference (all tests pass still).
This commit is contained in:
parent
a0e4aa487f
commit
f3181d64d0
1 changed files with 1 additions and 7 deletions
|
@ -2188,17 +2188,11 @@ build_function_call (const expr_t *fexpr, const type_t *ftype, const expr_t *par
|
|||
emit_args = false;
|
||||
expr_prepend_expr (args, new_args_expr ());
|
||||
}
|
||||
for (int i = 0; i < arg_expr_count - 1; i++) {
|
||||
for (int i = 0; i < arg_expr_count; i++) {
|
||||
scoped_src_loc (arg_exprs[i][0]);
|
||||
auto assign = assign_expr (arg_exprs[i][1], arg_exprs[i][0]);
|
||||
append_expr (call, assign);
|
||||
}
|
||||
if (arg_expr_count) {
|
||||
scoped_src_loc (arg_exprs[arg_expr_count - 1][0]);
|
||||
auto e = assign_expr (arg_exprs[arg_expr_count - 1][1],
|
||||
arg_exprs[arg_expr_count - 1][0]);
|
||||
append_expr (call, e);
|
||||
}
|
||||
auto ret_type = ftype->func.ret_type;
|
||||
call->block.result = call_expr (fexpr, args, ret_type);
|
||||
return call;
|
||||
|
|
Loading…
Reference in a new issue