flow: pass condition assignments to clients with ASSIGNMENT_HOOK
commitdba3b0297d683b04286f1a7c62d3d03113098019
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 Sep 2011 11:31:27 +0000 (22 14:31 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 Sep 2011 11:33:34 +0000 (22 14:33 +0300)
treecb9bb8960480232944205e4fcddf6b603e50f213
parent4dda1a3e0b9c366db502961f75e2e2752f1909a3
flow: pass condition assignments to clients with ASSIGNMENT_HOOK

The affects code like this:
foo = !bar;
where "foo" is either one or zero depending on the value of "bar".

In __handle_condition_assigns() it sets the value of "foo" for SMATCH_EXTRA,
but there are other checks need to handle the assignment as well.  So I
added a __pass_to_client(expr, ASSIGNMENT_HOOK) and I added a check in
the smatch_extra.c hook so it would ignore the assignment.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch.h
smatch_conditions.c
smatch_extra.c