struct_assignment: handle memcpy for pointer math better
commit2cb4f217bc8ca424a68f2c7cfa0733851e37023e
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Jul 2018 10:09:40 +0000 (24 13:09 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Jul 2018 10:09:40 +0000 (24 13:09 +0300)
tree08c418122a59083033cdf57050a4f3cae7364b41
parent3d91ea93dbeee7a56791cfc637e7982ef99f61ed
struct_assignment: handle memcpy for pointer math better

Say you have "memcpy(dest, array + 16, sizeof(element));" then the
remove_addr() was supposed to create a deref_expression() but it only
worked for pointers and not arrays.  It should work for both.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_struct_assignment.c