1 /// Device node iterators put the previous value of the index variable, so an
2 /// explicit put causes a double put.
5 // Copyright: (C) 2015 Julia Lawall, Inria. GPLv2.
6 // URL: http://coccinelle.lip6.fr/
7 // Options: --no-includes --include-headers
9 // Keywords: for_each_child_of_node, etc.
11 // This uses a conjunction, which requires at least coccinelle >= 1.0.4
21 iterator name for_each_node_by_name, for_each_node_by_type,
22 for_each_compatible_node, for_each_matching_node,
23 for_each_matching_node_and_match, for_each_child_of_node,
24 for_each_available_child_of_node, for_each_node_with_property;
32 for_each_node_by_name(n,e1) S
34 for_each_node_by_type(n,e1) S
36 for_each_compatible_node(n,e1,e2) S
38 for_each_matching_node(n,e1) S
40 for_each_matching_node_and_match(n,e1,e2) S
42 for_each_child_of_node(e1,n) S
44 for_each_available_child_of_node(e1,n) S
46 for_each_node_with_property(n,e1) S
50 ... when != of_node_get(n)
58 local idexpression r.n;
69 @t depends on s && patch && !context && !org && !report@
76 // ----------------------------------------------------------------------------
78 @t_context depends on s && !patch && (context || org || report)@
84 * of_node_put@j0@p2(n);
86 // ----------------------------------------------------------------------------
88 @script:python t_org depends on org@
92 msg = "ERROR: probable double put."
93 coccilib.org.print_todo(j0[0], msg)
95 // ----------------------------------------------------------------------------
97 @script:python t_report depends on report@
101 msg = "ERROR: probable double put."
102 coccilib.report.print_report(j0[0], msg)