Home | History | Annotate | Download | only in SemaCXX

Lines Matching full:warning

9   int *p = &y[2]; // no-warning
10 (void) sizeof(x[2]); // no-warning
11 y[2] = 2; // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
12 z[1] = 'x'; // expected-warning {{array index 1 is past the end of the array (which contains 1 element)}}
13 w[0][2] = 0; // expected-warning {{array index 2 is past the end of the array (which contains 1 element)}}
14 v[0][0][2] = 0; // expected-warning {{array index 2 is past the end of the array (which contains 1 element)}}
15 return x[2] + // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
16 y[-1] + // expected-warning {{array index -1 is before the beginning of the array}}
17 x[sizeof(x)] + // expected-warning {{array index 8 is past the end of the array (which contains 2 elements)}}
18 x[sizeof(x) / sizeof(x[0])] + // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
19 x[sizeof(x) / sizeof(x[0]) - 1] + // no-warning
20 x[sizeof(x[2])]; // expected-warning {{array index 4 is past the end of the array (which contains 2 elements)}}
30 int val = a[3]; // no warning for function argumnet
34 int val = a[3]; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
41 s2.a[3] = 0; // no warning for 0-sized array
47 u.a[3] = 1; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
48 u.c[3] = 1; // no warning
49 short *p = &u.a[2]; // no warning
50 p = &u.a[3]; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
51 *(&u.a[2]) = 1; // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
52 *(&u.a[3]) = 1; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
53 *(&u.c[3]) = 1; // no warning
57 array[const_subscript] = 0; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
60 ptr[3] = 0; // no warning for pointer references
63 array2[3] = 0; // expected-warning {{array index 3 is past the end of the array (which contains 3 elements)}}
64 array2[2+2] = 0; // expected-warning {{array index 4 is past the end of the array (which contains 3 elements)}}
67 char c1 = str1[5]; // no warning for pointers
70 char c2 = str2[5]; // expected-warning {{array index 5 is past the end of the array (which contains 4 elements)}}
73 (*array_ptr)[3] = 1; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
81 s.arr[4] = 0; // expected-warning 2 {{array index 4 is past the end of the array (which contains 3 elements)}}
82 s.arr[I] = 0; // expected-warning {{array index 5 is past the end of the array (which contains 3 elements)}}
94 return ARR_IN_MACRO(0, arr, SIZE) + // no-warning
95 ARR_IN_MACRO(1, arr, SIZE); // expected-warning{{array index 10 is past the end of the array (which contains 10 elements)}}
101 return array[(unsigned long long) 100]; // expected-warning {{array index 100 is past the end of the array (which contains 100 elements)}}
111 arr[3] = 42; // no-warning
119 arr[3] = 42; // expected-warning{{array index 3 is past the end of the array (which contains 3 elements)}}
131 return array[true]; // no-warning
138 return sizeof(char) == sizeof(char) ? arr[2] : arr[1]; // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
145 arr[2] = 1; // no-warning
150 arr[2] = 1; // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
155 arr[2] = 1; // no-warning
166 switch (enumA_E) { // expected-warning {{no case matching constant}}
167 switch (myVal) { // expected-warning {{enumeration values 'enumB_X' and 'enumB_Z' not handled in switch}}
184 x[2] = 0; // no-warning
202 return F->c1[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
203 F->c2[3] + // no warning, foo could have tail padding allocated.
204 B->c1[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
205 B->c2[3]; // no warning, baz could have tail padding allocated.
215 return F->c[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
216 B->c[3]; // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
223 bar(foo[5]); // expected-warning {{array index 5 is past the end of the array (which contains 5 elements)}}
224 ++foo[5]; // expected-warning {{array index 5 is past the end of the array (which contains 5 elements)}}
225 if (foo[6]) // expected-warning {{array index 6 is past the end of the array (which contains 5 elements)}}
226 return --foo[6]; // expected-warning {{array index 6 is past the end of the array (which contains 5 elements)}}
228 return foo[5]; // expected-warning {{array index 5 is past the end of the array (which contains 5 elements)}}
234 ((char*)foo)[sizeof(foo) - 1] = '\0'; // no-warning
235 *(((char*)foo) + sizeof(foo) - 1) = '\0'; // no-warning
237 ((char*)foo)[sizeof(foo)] = '\0'; // expected-warning {{array index 32768 is past the end of the array (which contains 32768 elements)}}
240 *(((char*)foo) + sizeof(foo)) = '\0'; // no-warning
248 test_pr11007_aux("foo", a[1000]); // expected-warning {{array index 1000 is past the end of the array}}
254 a[(unsigned char)'\xA1'] = 1; // expected-warning {{array index 161 is past the end of the array}}