smatch_extra: I don't like empty ranges
commita157c327c1fb908b49c5fa8495bedd95c3b10a5b
authorDan Carpenter <error27@gmail.com>
Fri, 8 Jan 2010 07:38:54 +0000 (8 10:38 +0300)
committerDan Carpenter <error27@gmail.com>
Fri, 8 Jan 2010 07:38:54 +0000 (8 10:38 +0300)
tree5c4a56fa103796f31dffbada0e5d1056d06a6f4a
parentb248712d96704069aac266adcdd44fe6289eb0a3
smatch_extra: I don't like empty ranges

Originally I thought empty ranges should mean everything was included.  But
these days I think that was a mistake.  Most empty ranges come from
impossible conditions.

x = 0;
if (x > 100) {
    // <-- x has an empty range.

Then when we merge the ranges we get an empty range again and we can't
get rid of the empty range because it trumps everything.

Really --two-passes and --known-conditions should be turned on by default
and smatch should complain about impossible conditions that can not be
optimized away at compile time.

Signed-off-by: Dan Carpenter <error27@gmail.com>
smatch_ranges.c