extra: fix test for take assignments
commitba1d55482a2c06fcbdcb190c55162529df8a8673
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Jan 2021 09:22:14 +0000 (25 12:22 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Jan 2021 09:22:14 +0000 (25 12:22 +0300)
tree53abf9b738e9dba062354927c29d632a2f6a0491
parenta94569ff1ce36c1ba4350579a9f499391d675aca
extra: fix test for take assignments

The problem is when we have a function call like "foo(x = whatever());"
The parameter gets changed into an assignment like __fake = x = whatever();
[ Revisit: if this is always necessary. ] so then both assignments are
treated as fake even though only one is.

The practical implications of this are that the equiv variables are not
tacked correctly.  And it messes up the parsing badly.  This is especially
important in the kernel because it affects the MIN() macro.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_expressions.c
smatch_extra.c
smatch_extra.h
smatch_param_to_mtag_data.c