param_key: fix an ordering bug
commit743b379cab45a48ec005560177a04538c8041869
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 2 Nov 2020 09:11:27 +0000 (2 12:11 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 2 Nov 2020 09:24:12 +0000 (2 12:24 +0300)
tree9b76abfceb95377dd8b1d7b1a03f722fce1135d4
parentbfb27baec3939ee978ce7a9100c5111635764788
param_key: fix an ordering bug

The problem is when you have something like "foo = param".  It was
first recording that "foo is now $" (the param key).  Then it was recording
the smatch_extra assignment "$ is now whatever range list".  And that's
clearly wrong because we haven't set the parameter to anything.  Plus that
would be a stack assignment so we can't PARAM_SET it.

This fix for this is slightly weird, but if we get the ordering right then
I believe it just works.

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