Handle aliased types when building function calls

This commit is contained in:
Bill Currie 2020-02-19 21:28:32 +09:00
parent fd2b7ee6f9
commit 1b43046c8a
2 changed files with 4 additions and 2 deletions

View file

@ -623,7 +623,7 @@ expr_t *binary_expr (int op, expr_t *e1, expr_t *e2);
expr_t *field_expr (expr_t *e1, expr_t *e2);
expr_t *asx_expr (int op, expr_t *e1, expr_t *e2);
expr_t *unary_expr (int op, expr_t *e);
expr_t *build_function_call (expr_t *fexpr, struct type_s *ftype,
expr_t *build_function_call (expr_t *fexpr, const struct type_s *ftype,
expr_t *params);
expr_t *function_expr (expr_t *e1, expr_t *e2);
struct function_s;

View file

@ -1843,7 +1843,7 @@ bitnot_expr:
}
expr_t *
build_function_call (expr_t *fexpr, type_t *ftype, expr_t *params)
build_function_call (expr_t *fexpr, const type_t *ftype, expr_t *params)
{
expr_t *e;
int arg_count = 0, parm_count = 0;
@ -1855,6 +1855,8 @@ build_function_call (expr_t *fexpr, type_t *ftype, expr_t *params)
expr_t *call;
expr_t *err = 0;
ftype = unalias_type (ftype);
for (e = params; e; e = e->next) {
if (e->type == ex_error)
return e;