• Home
  • Raw
  • Download

Lines Matching +full:has +full:- +full:value

1 // RUN: %clang_cc1 -std=c99 -Dbool=_Bool -analyze -analyzer-checker=core,alpha.core.TestAfterDivZer…
2 // RUN: %clang_cc1 -x c++ -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-out…
7 var = 77 / x; // expected-note {{Division with compared value made here}} in err_eq()
8 …if (x == 0) { } // expected-warning {{Value being compared against zero has already been used for … in err_eq()
9 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_eq()
12 var = 77 / x; // expected-note {{Division with compared value made here}} in err_eq2()
13 …if (0 == x) { } // expected-warning {{Value being compared against zero has already been used for … in err_eq2()
14 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_eq2()
17 var = 77 / x; // expected-note {{Division with compared value made here}} in err_ne()
18 …if (x != 0) { } // expected-warning {{Value being compared against zero has already been used for … in err_ne()
19 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_ne()
22 var = 77 / x; // expected-note {{Division with compared value made here}} in err_ge()
23 …if (x >= 0) { } // expected-warning {{Value being compared against zero has already been used for … in err_ge()
24 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_ge()
27 var = 77 / x; // expected-note {{Division with compared value made here}} in err_le()
28 …if (x <= 0) {} // expected-warning {{Value being compared against zero has already been used for d… in err_le()
29 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_le()
32 var = 77 / x; // expected-note {{Division with compared value made here}} in err_yes()
33 …if (x) {} // expected-warning {{Value being compared against zero has already been used for divisi… in err_yes()
34 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_yes()
36 var = 77 / x; // expected-note {{Division with compared value made here}} in err_not()
37 …if (!x) {} // expected-warning {{Value being compared against zero has already been used for divis… in err_not()
38 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_not()
42 var = 77 / *y; // expected-note {{Division with compared value made here}} in err_pnot()
43 …if (!x) {} // expected-warning {{Value being compared against zero has already been used for divis… in err_pnot()
44 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_pnot()
48 var = 77 / x; // expected-note {{Division with compared value made here}} in err_pnot2()
49 …if (!*y) {} // expected-warning {{Value being compared against zero has already been used for divi… in err_pnot2()
50 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_pnot2()
55 var = 77 / **z; // expected-note {{Division with compared value made here}} in err_ppnot()
56 …if (!x) {} // expected-warning {{Value being compared against zero has already been used for divis… in err_ppnot()
57 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_ppnot()
60 if (x != 0) // expected-note {{Assuming 'x' is equal to 0}} expected-note {{Taking false branch}} in err_orig_checker()
62 var = 77 / x; // expected-warning {{Division by zero}} expected-note {{Division by zero}} in err_orig_checker()
63 if (!x) {} // no-warning in err_orig_checker()
74 x = var / 77; // <- assignment => don't warn in ok_assign()
81 x = var / 77; // <- assignment => don't warn in ok_assign2()
88 x--; // <- assignment => don't warn in ok_dec()
95 x++; // <- assignment => don't warn in ok_inc()
103 do_something_ptr(&x); // <- pass address of x to function => don't warn in ok_callfunc_ptr()
110 var = 77 / x; // expected-note {{Division with compared value made here}} in nok_callfunc()
112 …if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for d… in nok_callfunc()
113 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in nok_callfunc()
155 use(5 / x); // expected-note {{Division with compared value made here}} in foo2()
156 …if (y == 0) {} // expected-warning {{Value being compared against zero has already been used for d… in foo2()
157 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in foo2()
161 while (x != 0) { // <- do not warn in ok_while()
162 x--; in ok_while()
178 var = 77 / x; // expected-note {{Division with compared value made here}} in inline_func()
179 …if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for d… in inline_func()
180 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in inline_func()
184 inline_func(x); // expected-note {{Calling 'inline_func'}} in err_inline()
192 var = 77 / x; // expected-note {{Division with compared value made here}} in err_inline2()
194 …if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for d… in err_inline2()
195 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_inline2()
201 var = 77 / x; // expected-note {{Division with compared value made here}} in ok_inline()
203 …if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for d… in ok_inline()
204 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in ok_inline()