math: improve AND handling
commit41c85d2142b87ac4078f4a66bbeddffe37579fd4
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 22 Sep 2020 13:56:09 +0000 (22 16:56 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 22 Sep 2020 13:56:09 +0000 (22 16:56 +0300)
treeeb8d78169e2c41f0d0eb8f4c408bfae809bd45cc
parent45d764473886ed4d99cd9fe37c4fe722158e77b8
math: improve AND handling

I wrote this code some time ago and have been running it, so presumably it
is good code.  The original code seems to have assumed that the smallest
value was on the left.

We want to get the minimum maximum.  That's the highest shared bit.

This fixes parsing of array_index_nospec().

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