Commit | Line | Data |
---|---|---|
7f004419 C |
1 | @initialize:python@ |
2 | ||
3 | first = 0 | |
4 | ||
5 | @first_fct@ | |
6 | type T; | |
7 | identifier f; | |
8 | position p; | |
9 | @@ | |
10 | ||
11 | T f@p (...) {...} | |
12 | ||
13 | @script:python@ | |
14 | p << first_fct.p; | |
15 | @@ | |
16 | ||
8f657093 | 17 | if p[0].line > first and first == 0: |
7f004419 C |
18 | first = p[0].line |
19 | else: | |
8f657093 | 20 | cocci.include_match(False) |
7f004419 C |
21 | |
22 | @@ | |
23 | type T; | |
24 | identifier f; | |
25 | position first_fct.p; | |
26 | @@ | |
27 | ||
28 | +#include <foo.h> | |
29 | ||
30 | T f@p (...) {...} |