Debian Codegraph @

tools/spgen/tests/interleaved.cocci

raw
1 /* This file has interleaving of patch and non-patch rules. */
2
3 @match1@
4 declarer name module1;
5 declarer name module2;
6 identifier d;
7 @@
8
9 (
10 module1(d);
11 |
12 module2(d, ...);
13 )
14
15
16
17 @fix1 depends on match1@
18 identifier match1.d;
19 @@
20
21 static struct struct_name d = {
22 - .field = MACRO,
23 };
24
25
26 @match2@
27 identifier d;
28 @@
29
30 (
31 module3(&d)
32 |
33 module4(&d, ...)
34 |
35 module5(&d, ...)
36 )
37
38
39 @fix2 depends on match2@
40 identifier match2.d;
41 @@
42
43 static struct struct_name d = {
44 - .name = MACRO,
45 };