slist: introduce merge_fake_stree()
commitc1a7786a5ac71ec84b8c61f82d79a56f30fd9bf4
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 May 2014 09:42:50 +0000 (22 12:42 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 May 2014 09:42:50 +0000 (22 12:42 +0300)
treeb9cf2e4fc27ec614f54d5c58461956d3fb51e530
parente3cceb77b347ff0f2ed54bd91c9c6fe387d4130c
slist: introduce merge_fake_stree()

This process of having fake_strees is very subtle and tricky but we also
need it.

How a fake stree works is that we store the current stree, then we put a
layer on in front of the current stree to record any states which are
changed.  Then we look at the code.  This gives us a list of states which
are affect by this change.

The problem that this patch addresses is that we want to merge two fake
strees together, but there is an unmatched state.  Instead of defaulting
to &undefined, we should default to the original state.

You might ask why we don't just use all the states and not just the set
ones?  I did try that, and it didn't work...

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