Release coccinelle-0.2.0
[bpt/coccinelle.git] / scripts / coccicheck / cocci / notand.cocci
1 // !x&y combines boolean negation with bitwise and
2 //
3 // Confidence: High
4 // Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2.
5 // URL: http://www.emn.fr/x-info/coccinelle/rules/notand.html
6 // Options: -macro_file_builtins ../cocci/notand.h
7
8 virtual org,diff
9
10 @r@
11 expression E;
12 constant C;
13 position p;
14 @@
15
16 (
17 !E & !C
18 |
19 !@p E & C
20 )
21
22 @script:python depends on org@
23 p << r.p;
24 @@
25
26 cocci.print_main("",p)
27
28 @depends on diff@
29 expression E;
30 position r.p;
31 @@
32
33 * !@p E