extra: don't reset impossible states after a condition
commitc4417a0877302b37aa724dabf67ceb930aa9730e
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Sep 2018 11:56:46 +0000 (11 14:56 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Sep 2018 11:56:46 +0000 (11 14:56 +0300)
tree2b49c965e4ce5ae0e6daf4a625bc6ae17f6b5d66
parent850ca49f882c4d8720c67e7ff9b10d1d390f69b5
extra: don't reset impossible states after a condition

Say you have "x" set to an empty state, then would do "if (x != 3)" then it
was setting the true and false states.  We don't want that, we want
empty to remain empty.

The issue I think is that we started using get_real_absolute_rl() to get
the rl.  That function retuns the whole rl for empty states.  We don't have
a way to return an empty rl, only a NULL rl otherwise we'd maybe look at
changing get_real_absolute_rl().  This might be the only situation where it
matters so maybe this is fine.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_extra.c
validation/sm_impossible3.c [new file with mode: 0644]