modification_hooks: complete rewrite
The old modification_hooks didn't work very well. For example if you had
this code:
free(foo->x);
foo++;
free(foo->x);
Then the old code complained about a double free.
The API is also changed. In the new code, you just have one default
modification hook per check. If a variable is modified we just pass the
old sm_state to the call_back.
The other thing I added was the "indirect" modification hook for
smatch_extra. Smatch_extra handles direct modification like foo->x = 42
but for foo++, it just wants to set foo->x to unknown.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
20 files changed: