Lines Matching full:comparison
7 return C != 1; // expected-warning {{comparison between pointer and integer ('char *' and 'int')}}
16 (a == (unsigned long) b) + // expected-warning {{comparison of integers of different signs}}
20 ((long) a == b) + // expected-warning {{comparison of integers of different signs}}
21 ((int) a == b) + // expected-warning {{comparison of integers of different signs}}
22 ((short) a == b) + // expected-warning {{comparison of integers of different signs}}
23 ((signed char) a == b) + // expected-warning {{comparison of integers of different signs}}
24 ((long) a == (unsigned long) b) + // expected-warning {{comparison of integers of different signs}}
25 ((int) a == (unsigned int) b) + // expected-warning {{comparison of integers of different signs}}
28 (a < (unsigned long) b) + // expected-warning {{comparison of integers of different signs}}
32 ((long) a < b) + // expected-warning {{comparison of integers of different signs}}
33 ((int) a < b) + // expected-warning {{comparison of integers of different signs}}
34 ((short) a < b) + // expected-warning {{comparison of integers of different signs}}
35 ((signed char) a < b) + // expected-warning {{comparison of integers of different signs}}
36 ((long) a < (unsigned long) b) + // expected-warning {{comparison of integers of different signs}}
37 ((int) a < (unsigned int) b) + // expected-warning {{comparison of integers of different signs}}
80 (a < (unsigned long) B) + // expected-warning {{comparison of integers of different signs}}
88 ((long) a < (unsigned long) B) + // expected-warning {{comparison of integers of different signs}}
89 ((int) a < (unsigned int) B) + // expected-warning {{comparison of integers of different signs}}
96 (C == (unsigned short) b) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'unsigned short' is always false}}
97 (C == (unsigned char) b) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'unsigned char' is always false}}
108 (C < (unsigned short) b) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'unsigned short' is always false}}
109 (C < (unsigned char) b) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'unsigned char' is always false}}
126 ((short) a == C) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'short' is always false}}
127 ((signed char) a == C) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'signed char' is always false}}
132 (a < (unsigned long) C) + // expected-warning {{comparison of integers of different signs}}
138 ((short) a < C) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'short' is always true}}
139 ((signed char) a < C) + // expected-warning {{comparison of constant 'C' (65536) with expression of type 'signed char' is always true}}
140 ((long) a < (unsigned long) C) + // expected-warning {{comparison of integers of different signs}}
141 ((int) a < (unsigned int) C) + // expected-warning {{comparison of integers of different signs}}
148 (0x80000 == (unsigned short) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned short' is always false}}
149 (0x80000 == (unsigned char) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned char' is always false}}
160 (0x80000 < (unsigned short) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned short' is always false}}
161 (0x80000 < (unsigned char) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned char' is always false}}
178 ((short) a == 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'short' is always false}}
179 ((signed char) a == 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'signed char' is always false}}
184 (a < (unsigned long) 0x80000) + // expected-warning {{comparison of integers of different signs}}
190 ((short) a < 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'short' is always true}}
191 ((signed char) a < 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'signed char' is always true}}
192 ((long) a < (unsigned long) 0x80000) + // expected-warning {{comparison of integers of different signs}}
193 ((int) a < (unsigned int) 0x80000) + // expected-warning {{comparison of integers of different signs}}
210 return a == b; // expected-warning {{comparison of distinct pointer types}}
214 return a > 0; // expected-warning {{ordered comparison between pointer and zero ('int *' and 'int') is an extension}}
215 return a > 42; // expected-warning {{ordered comparison between pointer and integer ('int *' and 'int')}}
216 return a > (void *)0; // expected-warning {{comparison of distinct pointer types}}
220 return a > b; // expected-warning {{ordered comparison of function pointers}}
221 return function_pointers > function_pointers; // expected-warning {{self-comparison always evaluates to false}} expected-warning{{ordered comparison of function pointers}}
222 return a > c; // expected-warning {{comparison of distinct pointer types}}
224 return a == (void *) 1; // expected-warning {{equality comparison between function pointer and void pointer}}
248 if (x->u8 == i32) { // comparison in int32, exact
250 } else if (x->u31 == i32) { // comparison in int32, exact
252 } else if (x->u32 == i32) { // expected-warning {{comparison of integers of different signs}}
254 } else if (x->u63 == i32) { // comparison in uint64, exact because ==
256 } else if (x->u64 == i32) { // expected-warning {{comparison of integers of different signs}}
275 if (value < (unsigned long) &ptr4) // expected-warning {{comparison of integers of different signs}}
281 return (x < 0) // expected-warning {{comparison of unsigned expression < 0 is always false}}
282 && (0 > x) // expected-warning {{comparison of 0 > unsigned expression is always false}}
283 && (x >= 0) // expected-warning {{comparison of unsigned expression >= 0 is always true}}
284 && (0 <= x); // expected-warning {{comparison of 0 <= unsigned expression is always true}}
292 // <rdar://problem/8414119> enum >= (enum)0 comparison should not generate any warnings
311 if (a < 0) // expected-warning {{comparison of unsigned enum expression < 0 is always false}}
318 return sv == (uv ^= slv); // expected-warning {{comparison of integers of different signs: 'int' and 'unsigned int'}}
327 b = (si == (ui = sl)); // expected-warning {{comparison of integers of different signs: 'int' and 'unsigned int'}}