sval: extra: absolute: change how assignments are handled
commit8427b7fbb51f6dabfab424a8b66a19176b21420e
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 8 Nov 2012 15:58:19 +0000 (8 18:58 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 8 Nov 2012 15:58:19 +0000 (8 18:58 +0300)
tree8ee1f44780ad6c88b92cab466244c980f907805f
parentecf76bd514e4ffd92cf50763dc75dd4a6cab9708
sval: extra: absolute: change how assignments are handled

Imagine that we have:
char x;
int y;
...
y = x;

We know that y is between (-128)-127, but this shouldn't be stored in
smatch_extra.c it should be in smatch_absolute.c.  The difference is that
smatch_extra.c is affects get_implied_value() which is used to detect
array overflows.  Smatch_absolute.c affects get_absolute_min/max().

Also I changed how smatch absolute calculates the min and max.  Using
cast_rl() is more accurate.

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