comparison: comparisons with 3 variables: "a > b + c"
commit39460b3815cf5a67f0df670a7d973899483df8d6
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Jun 2013 05:33:14 +0000 (28 08:33 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Jun 2013 05:33:14 +0000 (28 08:33 +0300)
tree05398d57b9d9bb4a41f51a4b99913413e3e11aeb
parenta059bac45e771f8125be731aa8da407bf54f221f
comparison: comparisons with 3 variables: "a > b + c"

Smatch comparison is already dealing with the relationships between two
variables so adding a third variable is not that complicated.  You just
need to save a third link so that if any of the variables are modified
then the relationship is destroyed.

The chunk_to_var_sym() is like expr_to_var_sym() except that if there are
two variables involved then it doesn't give you a symbol pointer.

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