Don't clone all the states for every case statement.
Smatch was running out of memory a lot because it did a
clone_slist_and_states() for every case statement. With this change we
only clone the states right before we do a merge.
This change does make validation/sm_switch.c fail.
The problem with that switch is that we want to say if, "if x is not 1
and not 2 then we can eliminate these paths." But we actually check
it separately, "if x is not 1 we eliminate this path. If x is not 2 we
eliminate this other path", but we don't check the compound condition.
Switch statement are a bit different from if statements. If we did an
if (x == 3)
c->a = 1;
the test would actually pass.
I will fix this asap obviously.
Signed-off-by: Dan Carpenter <error27@gmail.com>