dinfo: introduce extra_empty()
commit04d183b47fde203413463de481531b267c99bdce
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 20 Feb 2012 06:46:12 +0000 (20 09:46 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 20 Feb 2012 06:46:12 +0000 (20 09:46 +0300)
treec4b781b0987d965749c347ec3064f87f10fc0b12
parent5d741e5695c31258f54621c4325344eecc897d4b
dinfo: introduce extra_empty()

We do need to have an empty state to handle conditions which are
impossible.  For example:
    x = 1;
    if (x >= 2) { ...

If we treat an impossible state as an extra_undefined() then when we merge
the extra_undefined() and the true state we get an extra_undefined().  What
we want is an extra_empty() and when we merge it with the true state we
get the true state.

There are plenty of places in the code where certain conditions.  Perhaps
on the first loop through then we don't enter certain if statements.  So
it makes sense to handle impossible conditions in a deliberate way.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_dinfo.c
validation/sm_loops1.c