struct_assignment: handle struct assignments to better
commitd6c1d0e7234dbc39ce51d84566ae52feb9643f98
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Jan 2014 11:14:20 +0000 (13 14:14 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Jan 2014 11:14:20 +0000 (13 14:14 +0300)
tree96c97ae025f67d8be34163939746c03e5024d82e
parentd64957576f0a61a26d64a86421b0e353ac8ec093
struct_assignment: handle struct assignments to better

When you have structs "foo" and "bar" and the code is:

foo = bar;

Then create a fake assignment for "foo.x = bar.x" and "foo.y = bar.y".

Eventually I plan to use this code to handle memcpy() better as well.
Currently memcpy() is handled in smatch_clears_buffer() but I will move
it here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Makefile
smatch.h
smatch_struct_assignment.c [new file with mode: 0644]