/usr/share/doc/coccinelle-doc/examples/interprocedural_adhoc.cocci is in coccinelle-doc 1.0.0~rc10.deb-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | // Even if our analysis does not go through nodes containing
// funcall, we can still do some (limited) interprocedural modification.
@ rule1 @
identifier foo;
@@
ioctl (...) {
...
foo(3);
...
}
@@
identifier rule1.foo;
@@
foo(...)
{
- bar(1);
+ bar(2);
}
|