function_hooks: introduce get_implied_return()
commit34b54b7c67317dfb930aba35fe1f0234b7b0bb85
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Sep 2012 08:18:25 +0000 (20 11:18 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Sep 2012 08:18:25 +0000 (20 11:18 +0300)
tree07bd458693974ed1b5c4c69d19ee72ffaca9f500
parent3499705162fcc59ce907146420b4c9e2327e0d55
function_hooks: introduce get_implied_return()

In the old code there was a special hook called
add_function_assign_hook_extra() which was similar to
add_function_assign_hook() except that setting the values in SMATCH_EXTRA
needed to be handled differently.  This patch removes that an instead
introduces a call back called add_implied_return_hook() which takes a
function call and gives the implied range list which is returned.  This
is a better more flexible way of handling things.

This patch doesn't make a lot of difference on it's own, but later I will
add support so that:
return ERR_PTR(-ENOMEM);
is handled.  In the old code, that wasn't handled because it wasn't an
assignment.

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