-
Notifications
You must be signed in to change notification settings - Fork 894
/
bms_result.cocci
84 lines (63 loc) · 1.52 KB
/
bms_result.cocci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Some bitmap set operations recycle one of the input parameters or return
// a reference to a new bitmap set. The following set of rules checks that the
// returned reference is not discarded.
@rule_1@
expression E1, E2;
@@
+ /* Result of bms_add_member has to be used */
+ E1 = bms_add_member(E1, E2);
- bms_add_member(E1, E2);
@rule_2@
expression E1, E2;
@@
+ /* Result of bms_del_member has to be used */
+ E1 = bms_del_member(E1, E2);
- bms_del_member(E1, E2);
@rule_3@
expression E1, E2;
@@
+ /* Result of bms_add_members has to be used */
+ E1 = bms_add_members(E1, E2);
- bms_add_members(E1, E2);
@rule_4@
expression E1, E2, E3;
@@
+ /* Result of bms_add_range has to be used */
+ E1 = bms_add_range(E1, E2, E3);
- bms_add_range(E1, E2, E3);
@rule_5@
expression E1, E2;
@@
+ /* Result of bms_int_members has to be used */
+ E1 = bms_int_members(E1, E2);
- bms_int_members(E1, E2);
@rule_6@
expression E1, E2;
@@
+ /* Result of bms_del_members has to be used */
+ E1 = bms_del_members(E1, E2);
- bms_del_members(E1, E2);
@rule_7@
expression E1, E2;
@@
+ /* Result of bms_join has to be used */
+ E1 = bms_join(E1, E2);
- bms_join(E1, E2);
@rule_8@
expression E1, E2;
@@
+ /* Result of bms_union has to be used */
+ E1 = bms_union(E1, E2);
- bms_union(E1, E2);
@rule_9@
expression E1, E2;
@@
+ /* Result of bms_intersect has to be used */
+ E1 = bms_intersect(E1, E2);
- bms_intersect(E1, E2);
@rule_10@
expression E1, E2;
@@
+ /* Result of bms_difference has to be used */
+ E1 = bms_difference(E1, E2);
- bms_difference(E1, E2);