math: handle offset calculation better
commit380dca619abf8aacfcb2c19333c14820fc4b27e8
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 Aug 2017 20:26:09 +0000 (10 23:26 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 Aug 2017 20:26:17 +0000 (10 23:26 +0300)
tree6e0f36855edbb8ce66a37199df1db8f83968e937
parent4cf1d2dbc34c0e83a68b38f6867df7b98a01cc91
math: handle offset calculation better

It's easy enough to parse the offsetof() macro, but sometimes people do:

size = &foo->bar - foo;

So this patch adds support to parse that.

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