db, comparison, ranges: store ranges and comparison instead only one or other
commitb89d558ac03782530a6430481e113008bc0e8de5
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jun 2013 11:06:52 +0000 (13 14:06 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jun 2013 11:06:52 +0000 (13 14:06 +0300)
treeda90d2b4dc963d01ff97f222cac6887a42a52acc
parenta79d697bfe0b881650fa0e5a2afdaba7a4bd5302
db, comparison, ranges: store ranges and comparison instead only one or other

In the old format something could be stored as a range:

s32min-10

Or if we couldn't determine any range then it might be stored as a
comparison:

s32min-[<p0]

But now we want to store the range and the additional limitter:

s32min-10[<p0]

So if param 0 is 8 then the return range is s32min-7.  If param 0 is 100
then the return range is s32min-10.

Along with that I have cleaned up the str_to_comparison_arg() to not set
and endp pointer.  That wasn't used outside smatch_ranges.  The other
places only care about the parameter and the comparison.

After I updated smatch_db.c to the new format then there weren't any
callers to range_comparison_to_param() so I have removed that function.

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