• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:short

1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare %s -W…
7 …return C != 1; // expected-warning {{comparison between pointer and integer ('char *' and 'int')}} in test()
16 … (a == (unsigned long) b) + // expected-warning {{comparison of integers of different signs}} in ints()
18 (a == (unsigned short) b) + in ints()
20 ((long) a == b) + // expected-warning {{comparison of integers of different signs}} in ints()
21 ((int) a == b) + // expected-warning {{comparison of integers of different signs}} in ints()
22 ((short) a == b) + // expected-warning {{comparison of integers of different signs}} in ints()
23 ((signed char) a == b) + // expected-warning {{comparison of integers of different signs}} in ints()
24 …((long) a == (unsigned long) b) + // expected-warning {{comparison of integers of different signs… in ints()
25 … ((int) a == (unsigned int) b) + // expected-warning {{comparison of integers of different signs}} in ints()
26 ((short) a == (unsigned short) b) + in ints()
28 … (a < (unsigned long) b) + // expected-warning {{comparison of integers of different signs}} in ints()
30 (a < (unsigned short) b) + in ints()
32 ((long) a < b) + // expected-warning {{comparison of integers of different signs}} in ints()
33 ((int) a < b) + // expected-warning {{comparison of integers of different signs}} in ints()
34 ((short) a < b) + // expected-warning {{comparison of integers of different signs}} in ints()
35 ((signed char) a < b) + // expected-warning {{comparison of integers of different signs}} in ints()
36 …((long) a < (unsigned long) b) + // expected-warning {{comparison of integers of different signs}} in ints()
37 … ((int) a < (unsigned int) b) + // expected-warning {{comparison of integers of different signs}} in ints()
38 ((short) a < (unsigned short) b) + in ints()
44 (A == (unsigned short) b) + in ints()
48 ((short) A == b) + in ints()
52 ((short) A == (unsigned short) b) + in ints()
56 (A < (unsigned short) b) + in ints()
60 ((short) A < b) + in ints()
64 ((short) A < (unsigned short) b) + in ints()
70 (a == (unsigned short) B) + in ints()
74 ((short) a == B) + in ints()
78 ((short) a == (unsigned short) B) + in ints()
80 … (a < (unsigned long) B) + // expected-warning {{comparison of integers of different signs}} in ints()
82 (a < (unsigned short) B) + in ints()
86 ((short) a < B) + in ints()
88 …((long) a < (unsigned long) B) + // expected-warning {{comparison of integers of different signs}} in ints()
89 … ((int) a < (unsigned int) B) + // expected-warning {{comparison of integers of different signs}} in ints()
90 ((short) a < (unsigned short) B) + in ints()
96 …(C == (unsigned short) b) + // expected-warning {{comparison of constant 'C' (65536) with expressi… in ints()
97 …(C == (unsigned char) b) + // expected-warning {{comparison of constant 'C' (65536) with expressio… in ints()
100 ((short) C == b) + in ints()
104 ((short) C == (unsigned short) b) + in ints()
108 …(C < (unsigned short) b) + // expected-warning {{comparison of constant 'C' (65536) with expressio… in ints()
109 …(C < (unsigned char) b) + // expected-warning {{comparison of constant 'C' (65536) with expression… in ints()
112 ((short) C < b) + in ints()
116 ((short) C < (unsigned short) b) + in ints()
122 (a == (unsigned short) C) + in ints()
126 …((short) a == C) + // expected-warning {{comparison of constant 'C' (65536) with expression of typ… in ints()
127 …((signed char) a == C) + // expected-warning {{comparison of constant 'C' (65536) with expression … in ints()
130 ((short) a == (unsigned short) C) + in ints()
132 … (a < (unsigned long) C) + // expected-warning {{comparison of integers of different signs}} in ints()
134 (a < (unsigned short) C) + in ints()
138 …((short) a < C) + // expected-warning {{comparison of constant 'C' (65536) with expression of type… in ints()
139 …((signed char) a < C) + // expected-warning {{comparison of constant 'C' (65536) with expression o… in ints()
140 …((long) a < (unsigned long) C) + // expected-warning {{comparison of integers of different signs}} in ints()
141 … ((int) a < (unsigned int) C) + // expected-warning {{comparison of integers of different signs}} in ints()
142 ((short) a < (unsigned short) C) + in ints()
148 …(0x80000 == (unsigned short) b) + // expected-warning {{comparison of constant 524288 with express… in ints()
149 …(0x80000 == (unsigned char) b) + // expected-warning {{comparison of constant 524288 with expressi… in ints()
152 ((short) 0x80000 == b) + in ints()
156 ((short) 0x80000 == (unsigned short) b) + in ints()
160 …(0x80000 < (unsigned short) b) + // expected-warning {{comparison of constant 524288 with expressi… in ints()
161 …(0x80000 < (unsigned char) b) + // expected-warning {{comparison of constant 524288 with expressio… in ints()
164 ((short) 0x80000 < b) + in ints()
168 ((short) 0x80000 < (unsigned short) b) + in ints()
174 (a == (unsigned short) 0x80000) + in ints()
178 …((short) a == 0x80000) + // expected-warning {{comparison of constant 524288 with expression of ty… in ints()
179 …((signed char) a == 0x80000) + // expected-warning {{comparison of constant 524288 with expression… in ints()
182 ((short) a == (unsigned short) 0x80000) + in ints()
184 … (a < (unsigned long) 0x80000) + // expected-warning {{comparison of integers of different signs}} in ints()
186 (a < (unsigned short) 0x80000) + in ints()
190 …((short) a < 0x80000) + // expected-warning {{comparison of constant 524288 with expression of typ… in ints()
191 …((signed char) a < 0x80000) + // expected-warning {{comparison of constant 524288 with expression … in ints()
192 …((long) a < (unsigned long) 0x80000) + // expected-warning {{comparison of integers of different … in ints()
193 …((int) a < (unsigned int) 0x80000) + // expected-warning {{comparison of integers of different si… in ints()
194 ((short) a < (unsigned short) 0x80000) + in ints()
210 return a == b; // expected-warning {{comparison of distinct pointer types}} in arrays()
214 …return a > 0; // expected-warning {{ordered comparison between pointer and zero ('int *' and 'int'… in pointers()
215 …return a > 42; // expected-warning {{ordered comparison between pointer and integer ('int *' and '… in pointers()
216 return a > (void *)0; // expected-warning {{comparison of distinct pointer types}} in pointers()
220 return a > b; // expected-warning {{ordered comparison of function pointers}} in function_pointers()
221 …on_pointers > function_pointers; // expected-warning {{self-comparison always evaluates to false}}… in function_pointers()
222 return a > c; // expected-warning {{comparison of distinct pointer types}} in function_pointers()
224 …return a == (void *) 1; // expected-warning {{equality comparison between function pointer and voi… in function_pointers()
248 if (x->u8 == i32) { // comparison in int32, exact in test2()
250 } else if (x->u31 == i32) { // comparison in int32, exact in test2()
252 } else if (x->u32 == i32) { // expected-warning {{comparison of integers of different signs}} in test2()
254 } else if (x->u63 == i32) { // comparison in uint64, exact because == in test2()
256 } else if (x->u64 == i32) { // expected-warning {{comparison of integers of different signs}} in test2()
265 unsigned short x, y; in test3()
275 …if (value < (unsigned long) &ptr4) // expected-warning {{comparison of integers of different signs… in test4()
281 return (x < 0) // expected-warning {{comparison of unsigned expression < 0 is always false}} in test5()
282 && (0 > x) // expected-warning {{comparison of 0 > unsigned expression is always false}} in test5()
283 && (x >= 0) // expected-warning {{comparison of unsigned expression >= 0 is always true}} in test5()
284 && (0 <= x); // expected-warning {{comparison of 0 <= unsigned expression is always true}} in test5()
297 if (CHECK(v)) // no-warning in rdar8414119_foo()
299 if (v >= X) // no-warning in rdar8414119_foo()
303 return x >= ZERO; // no-warning in rdar8414119_bar()
311 if (a < 0) // expected-warning {{comparison of unsigned enum expression < 0 is always false}} in rdar8511238()
318 …return sv == (uv ^= slv); // expected-warning {{comparison of integers of different signs: 'int' a… in test9()
327 …b = (si == (ui = sl)); // expected-warning {{comparison of integers of different signs: 'int' and … in test10()
334 return y > (p->x >> 24); // no-warning in test11()
341 if (0 && -1 > a) { } in test12()