function_hooks: fix validation/sm_compare15.c handling
commit05edca9d599e669ea0c644d5c6e06aa15035c55a
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 9 Jun 2015 14:13:12 +0000 (9 17:13 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 9 Jun 2015 14:13:12 +0000 (9 17:13 +0300)
tree0f86cedc18b91aec99f9be622b8a466e6dc1a0a8
parentaef6d669fb2c74008615f414618c4b9a756571c6
function_hooks: fix validation/sm_compare15.c handling

This is still not 100% perfect...  But anyway, if we have code like:

if (foo < some_func()) {

I guess normally the assumption is that we know the return value of
some_func() and are checking the value of "foo".  But sometimes we know
"foo" and are checking what some_func() returns.  So we need to filter
both sides...

The part that isn't right is what about if both sides are a function call?

This stuff needs to be re-written.

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