Home | History | Annotate | Download | only in SemaCXX

Lines Matching refs:array

4   int x[2]; // expected-note 4 {{array 'x' declared here}}
5 int y[2]; // expected-note 2 {{array 'y' declared here}}
6 int z[1]; // expected-note {{array 'z' declared here}}
7 int w[1][1]; // expected-note {{array 'w' declared here}}
8 int v[1][1][1]; // expected-note {{array 'v' declared here}}
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)}}
20 x[sizeof(x[2])]; // expected-warning {{array index 4 is past the end of the array (which contains 2 elements)}}
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)}}
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)}}
56 int array[2]; // expected-note {{declared here}}
57 array[const_subscript] = 0; // expected-warning {{array index 3 is past the end of the array (which contains 2 elements)}}
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)}}
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)}}
93 int arr[SIZE]; // expected-note {{array 'arr' declared here}}
95 ARR_IN_MACRO(1, arr, SIZE); // expected-warning{{array index 10 is past the end of the array (which contains 10 elements)}}
100 short array[100]; // expected-note {{array 'array' declared here}}
101 return array[(unsigned long long) 100]; // expected-warning {{array index 100 is past the end of the array (which contains 100 elements)}}
104 // PR 9284 - a template parameter can cause an array bounds access to be
116 int arr[3 + (extendArray ? 1 : 0)]; // expected-note {{array 'arr' declared here}}
119 arr[3] = 42; // expected-warning{{array index 3 is past the end of the array (which contains 3 elements)}}
130 int array[2];
131 return array[true]; // no-warning
135 int arr[2] = { 0, 0 }; // expected-note {{array 'arr' declared here}}
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)}}
149 int arr[2]; // expected-note {{array 'arr' declared here}}
150 arr[2] = 1; // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}}
202 return F->c1[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
204 B->c1[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
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)}}
222 int foo[5]; // expected-note 5 {{array 'foo' declared here}}
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)}}
232 double foo[4096]; // expected-note {{array 'foo' declared here}}
237 ((char*)foo)[sizeof(foo)] = '\0'; // expected-warning {{array index 32768 is past the end of the array (which contains 32768 elements)}}
247 double a[5]; // expected-note {{array 'a' declared here}}
248 test_pr11007_aux("foo", a[1000]); // expected-warning {{array index 1000 is past the end of the array}}
253 int a[128]; // expected-note {{array 'a' declared here}}
254 a[(unsigned char)'\xA1'] = 1; // expected-warning {{array index 161 is past the end of the array}}