mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Override function declaration with definition
This fixes the problem of the function declaration parameter names overriding the definition's parameter names.
This commit is contained in:
parent
ffcee99835
commit
53c4c205ca
1 changed files with 3 additions and 2 deletions
|
@ -839,10 +839,11 @@ function_symbol (specifier_t spec)
|
||||||
s = new_symbol (name);
|
s = new_symbol (name);
|
||||||
s->sy_type = sy_func;
|
s->sy_type = sy_func;
|
||||||
s->type = unalias_type (sym->type);
|
s->type = unalias_type (sym->type);
|
||||||
s->params = sym->params;
|
|
||||||
s->metafunc = func;
|
|
||||||
symtab_addsymbol (current_symtab, s);
|
symtab_addsymbol (current_symtab, s);
|
||||||
}
|
}
|
||||||
|
//if it existed, override the declaration's parameters and metafunc
|
||||||
|
s->params = sym->params;
|
||||||
|
s->metafunc = func;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue