dereference: handle frob(&foo->bar); better
commitbf1c6d3c1a35d4b6d43bce6bb9500225651de40d
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 5 Oct 2023 15:14:47 +0000 (5 18:14 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Thu, 5 Oct 2023 15:14:47 +0000 (5 18:14 +0300)
tree00b5b5eb5f8281627631f7b8f8338ebd5a5a0fd2
parent684fe19184e1ec4c28dbc00525ed1a7a5165bef1
dereference: handle frob(&foo->bar); better

When you call frob(&foo->bar); then Smatch doesn't necessarily mark it as a
dereference because it isn't.  It's just passing an address.  But say
frob(); dereferences $0 then that should be handled as a dereference.  So
we have to do that here.

I initially thought maybe this should be handled in smatch_flow.c but
smatch_flow.c doesn't have the DEREFERENCES_PARAM information so it has to
be handled here.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
smatch_dereference.c