function_hooks: add add_function_param_hook()
commitdd213c6c7955e079454894b3c3be9e71c612fb81
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 28 Jul 2023 08:34:59 +0000 (28 11:34 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Fri, 28 Jul 2023 08:34:59 +0000 (28 11:34 +0300)
tree42bbaab15c137632f4453d6fb03d135b2073c1b5
parentbfaefafce6e95e399d37276d627d464c9d587926
function_hooks: add add_function_param_hook()

I like the idea of a param_key table, but it only works for name/sym
pairs.  It doesn't work for constants.  So what this does specify the
param and it gives you the expression.

Writing this commit message, I think probably a better approach would be
to have the param/key hook but it fakes up an expression pointer for you.
The code to fake up expressions isn't complete or the greatest code but
you could improve that as you need to.

Anyway, that's for a future date.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
smatch.h
smatch_function_hooks.c
smatch_param_key.c