function_hooks: set implied states earlier
commitc80a6645a6ccd5d2cb87322d48fd116105b09900
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Dec 2020 12:10:58 +0000 (16 15:10 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Dec 2020 12:10:58 +0000 (16 15:10 +0300)
treeca824e4bd71cef98d203c5fbb4a0fe7602ea2c8d
parentad5c2ca22d8e5d7d90ea25167748887aa6bdaa73
function_hooks: set implied states earlier

The bug here is that it was saving the implied states until the end and
then overwriting everything.  Meanwhile, if a parameter was assigned
inside the function then that was getting over written with the original
implied states.

We do need to wait until all the PARAM_LIMIT conditions are parsed before
we set the implied states, because we want to preserve the implications
(which are stored in the implied sm states).

This calls set_implied_states() over and over now.  I could add a flag to
only call it once or something, but that seems tricky and calling
set_implied_states() is a quick no-op so this is fine.

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