1 /// Many iterators have the property that the first argument is always bound
2 /// to a real list element, never NULL. False positives arise for some
3 /// iterators that do not have this property, or in cases when the loop
4 /// cursor is reassigned. The latter should only happen when the matched
5 /// code is on the way to a loop exit (break, goto, or return).
7 // Confidence: Moderate
8 // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2.
9 // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2.
10 // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
11 // URL: http://coccinelle.lip6.fr/
13 // Options: -no_includes -include_headers
25 - if (x == NULL && ...) S
27 - if (x != NULL || ...)
36 - (x == NULL && ...) ? E1 :
39 - (x != NULL || ...) ?
43 - if (x == NULL && ...) S1 else
46 - if (x != NULL || ...)