param_clear: add support for BUF_ADD
This is a sort similar situation to PARAM_ADD. PARAM_ADD means you take
a function parameter "*x" and you leave some or all of the original values
but you also assign it a value.
void frob(int *x)
{
if (something)
*x = 100;
}
The value *x after the call is all the original possible values, but also
potentially 100.
This is the same except with buffers. You have a memcpy() which happens
on one path but not on the other paths. Originally there was a possibility
that this would get translated into over a thousand useless PARAM_ADD
values. I want it instead to be saved as a single (probably still useless)
BUF_ADD entry.
It's hard to know what to do with this information in the caller. I guess
the only thing to do is ensure that everything is marked as unknown in
smatch_extra.c.
Signed-off-by: Dan Carpenter <error27@gmail.com>