function_hooks: improve how function assignments are handled
commitaad3ad9670280bda543d662e497ffc9138b17e8d
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Dec 2014 08:02:12 +0000 (8 11:02 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Dec 2014 08:02:12 +0000 (8 11:02 +0300)
tree3a152fab245a0f77ce1266ad38ceeb84b714aab3
parente0b88d8005ff46ef04c74d84e1beee6270a6bc14
function_hooks: improve how function assignments are handled

The problem here is this:

p = frob(p, xxx);

The problem is that "p" is both the return range and a parameter.  When we
set "p" to the return values it messes up the code which needs to see the
parameter values.  So we store the ret_range in a separate place and only
set the state at the end.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_function_hooks.c