ranges: make sval_too_big() more accurate
commit602906479d554b4a336006ca1f9357c5db6ce9f2
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 May 2017 08:36:43 +0000 (23 11:36 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 May 2017 08:36:43 +0000 (23 11:36 +0300)
tree506e94c8de2744f0c33f7a82f6d1f671c20b3df1
parentd8bea5e949ba2c77f4411b092db0d01c97d8397d
ranges: make sval_too_big() more accurate

Writing this changelog, I'm not totally sure we should even have the
sval_too_big() function.  What I'm doing is when we cast a range_list
from one type to the other, if the first range doesn't map to within
the second range then we just give up and say the result is the whole
range of the second smaller type.

The bug that I was trying to address was that casting a negative to
unsigned, such as u32 -> s32 was making Smatch just give up.

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