db: try to create a link from data to function (through function pointers)
commit04ceb22c95e47594cc0a7b9f7b805faaa1cec513
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Oct 2017 13:28:25 +0000 (4 16:28 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Oct 2017 13:32:07 +0000 (4 16:32 +0300)
treec40547c3f9a8064bd92ad0444e1f2b9395b95595
parentf9e01c13d98a380dded64c9c3ce8b403bfc402d2
db: try to create a link from data to function (through function pointers)

Most function pointer calls let you specify a data argument.  For example
you could have something like this:

foo->func = my_func;
foo->data = my_data;

foo->func(foo->data, blah, blah);

The goal of this is to track it back so we can link a function with a
specific argument.  The first thing I want to track is just the type of
argument so that I can from within the function if a void pointer is just
a specific struct type casted to void.  It works imperfectly, but hopefully
it's a platform which can be fixed later.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Makefile
check_list.h
smatch.h
smatch_about_fn_ptr_arg.c [new file with mode: 0644]
smatch_data/db/fn_data_link.schema [new file with mode: 0644]
smatch_data/db/fn_ptr_data_link.schema [new file with mode: 0644]
smatch_db.c
smatch_fn_arg_link.c [new file with mode: 0644]