I see. Yes, --all-includes did the trick for me, thank you.
Although I'm still have to update struct fields in addition to struct
name and it seems like I'm using typedef in a wrong way.
For example:
_______________________
@@
@@
struct
- old_addr
+ new_address
@@
identifier a;
typedef new_address;
@@
new_address a;
- a.len;
+ a.length;
_______________________
This does not cause field updates although first part (names) works.
Using 'typedef struct new_address' instead gives "meta: parse error".
Using 'old_addr' instead of 'new_address' in 2nd part doesn't make any
difference.
The len/length are pretty generic names used in multiple structs. How do
I instruct Coccinelle to make replacement only for identifiers which
belong to a particular struct type (or pointer to it)?
Is there some specific metaver syntax related to structs which I haven't
found yet?
18.12.18 17:19, Julia Lawall пишет:
By default, Coccinelle only includes the headers that have the same name
as the .c file. Ie for foo.c, it considers that foo.h is prbably
important, and thus worth the often large extra runtime cost to take into
account.
If you want more aggressive inclusion of headers, you need --all-includes
(the headers explicitly mentioned in the .c file) or --recursive-includes
(headers included by other headers).
julia
--
- Max Suraev <[email protected]> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Harald Welte
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci