core: introduce &ghost state
commite897918b8a275f150048ddd16716a804343c8d14
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 Dec 2014 12:57:44 +0000 (1 15:57 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 Dec 2014 12:57:44 +0000 (1 15:57 +0300)
treeb5c342ff8f2eda4a2dcd0fde9433b8dd331ff60e
parent8569139062fc47451b67183a1438a7b0950821aa
core: introduce &ghost state

If "foo" is NULL then "foo->bar" is a ghost state.  When we merge a ghost
state with a &whatever then the result is &whatever.

Smatch_extra already has custom unmatched_state and merge functions so it
works this way.  But really this should be the default for everything.  I
didn't have a specific reason for this code, but it doesn't seem to cause
any false positives.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch.h
smatch_helper.c
smatch_slist.c
smatch_states.c