Checking function annotations with SmPL
Hello,
I would like to find specific information in source code also by the means of the semantic patch language.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/string.h?id=917cda2790c4bd624c5191b8d9edd12121749e86#n182
https://elixir.bootlin.com/linux/v5.4-rc2/source/include/linux/string.h#L182
Possible search results:
* extern char *kstrdup(const char *s, gfp_t gfp) __malloc;
* int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4);
Such function declarations can become more interesting, can't they? Unfortunately, I stumble on another error message.
@display@
identifier action, tag;
type rt;
@@
rt action(...)
(
*tag(...)
|
*tag
)
;
elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci show_function_annotations1.cocci …
minus: parse error:
File "show_function_annotations1.cocci", line 6, column 0, charpos = 62
around = '(',
whole content = (
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci