Lines Matching full:used
29 void testIncrement(char *p) { // expected-warning{{'p' is an unsafe pointer used for buffer access}}
30 ++p; // expected-note{{used in pointer arithmetic here}}
31 p++; // expected-note{{used in pointer arithmetic here}}
32 --p; // expected-note{{used in pointer arithmetic here}}
33 p--; // expected-note{{used in pointer arithmetic here}}
40 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
41 // expected-warning@-2{{'pp' is an unsafe pointer used for buffer access}}
42 foo(p[1], // expected-note{{used in buffer access here}}
43 pp[1][1], // expected-note{{used in buffer access here}}
45 1[1[pp]], // expected-note{{used in buffer access here}}
47 1[pp][1] // expected-note{{used in buffer access here}}
51 if (p[3]) { // expected-note{{used in buffer access here}}
67 foo(a[idx], idx[a], // expected-note2{{used in buffer access here}}
69 // expected-note@-1{{used in buffer access here}}
71 // expected-note@-1{{used in buffer access here}}
74 // expected-note@-2{{used in buffer access here}}
88 auto ap1 = a; // expected-warning{{'ap1' is an unsafe pointer used for buffer access}}
89 foo(ap1[1]); // expected-note{{used in buffer access here}}
92 auto * ap2 = a; // expected-warning{{'ap2' is an unsafe pointer used for buffer access}} \
94 foo(ap2[1]); // expected-note{{used in buffer access here}}
103 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
104 // expected-warning@-2{{'q' is an unsafe pointer used for buffer access}}
105 // expected-warning@-3{{'a' is an unsafe pointer used for buffer access}}
106 // expected-warning@-4{{'b' is an unsafe pointer used for buffer access}}
108 foo(p[1], 1[p], p[-1], // expected-note3{{used in buffer access here}}
109 q[1], 1[q], q[-1], // expected-note3{{used in buffer access here}}
110 a[1], // expected-note{{used in buffer access here}} `a` is of pointer type
111 b[1][2] // expected-note{{used in buffer access here}} `b[1]` is of array type
166 int * gp = garray; // expected-warning{{'gp' is an unsafe pointer used for buffer access}}
170 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
174 return p[1] // expected-note{{used in buffer access here}}
175 + a[idx] + garray[idx]// expected-note2{{used in buffer access here}}
176 + gp[1]; // expected-note{{used in buffer access here}}
182 // expected-warning@-1{{'ptr' is an unsafe pointer used for buffer access}}
184 ptr[5] = 10; // expected-note{{used in buffer access here}}
194 return a[idx]; // expected-note{{used in buffer access here}}
197 auto Lam2 = [x = b[c[5]]]() { // expected-note{{used in buffer access here}}
201 auto Lam = [x = c](unsigned idx) { // expected-warning{{'x' is an unsafe pointer used for buffer access}}
202 return x[idx]; // expected-note{{used in buffer access here}}
213 return a[idx]; // expected-note{{used in buffer access here}}
217 return b[idx]; // expected-note{{used in buffer access here}}
224 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
225 foo(p[1], // expected-note{{used in buffer access here}}
226 p[1].a[1], // expected-note{{used in buffer access here}}
227 p[1].b[1] // expected-note{{used in buffer access here}}
233 // expected-warning@-1{{'t' is an unsafe pointer used for buffer access}}
234 // expected-warning@-2{{'pt' is an unsafe pointer used for buffer access}}
235 // expected-warning@-3{{'a' is an unsafe pointer used for buffer access}}
236 foo(pt[1], // expected-note{{used in buffer access here}}
237 a[1], // expected-note{{used in buffer access here}}
239 return &t[1]; // expected-note{{used in buffer access here}}
248 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
249 // expected-warning@-2{{'x' is an unsafe pointer used for buffer access}}
251 auto y = &a[0]; // expected-warning{{'y' is an unsafe pointer used for buffer access}}
253 foo(p + 1, 1 + p, p - 1, // expected-note3{{used in pointer arithmetic here}}
255 x + 1, 1 + x, x - 1, // expected-note3{{used in pointer arithmetic here}}
256 y + 1, 1 + y, y - 1, // expected-note3{{used in pointer arithmetic here}}
260 p += 1; p -= 1; // expected-note2{{used in pointer arithmetic here}}
262 y += 1; y -= 1; // expected-note2{{used in pointer arithmetic here}}
263 x += 1; x -= 1; // expected-note2{{used in pointer arithmetic here}}
293 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
294 p++; // expected-note{{used in pointer arithmetic here}}
298 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
299 p++; // expected-note{{used in pointer arithmetic here}}
304 int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
305 q++; // expected-note{{used in pointer arithmetic here}}
312 int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
313 q++; // expected-note{{used in pointer arithmetic here}}
319 int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
320 q++; // expected-note{{used in pointer arithmetic here}}
326 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
327 p++; // expected-note{{used in pointer arithmetic here}}
332 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
333 p++; // expected-note{{used in pointer arithmetic here}}
339 foo( [p]() { int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
340 q++; // expected-note{{used in pointer arithmetic here}}
343 ^(int *p) { // expected-warning{{'p' is an unsafe pointer used for buffer access}}
344 p++; // expected-note{{used in pointer arithmetic here}}
350 // expected-warning@-1{{'p' is an unsafe pointer used for buffer access}}
351 int * q = p++; // expected-note{{used in pointer arithmetic here}}
352 int a[p[1]]; // expected-note{{used in buffer access here}}
353 int b = p[1]; // expected-note{{used in buffer access here}}
354 return p[1]; // expected-note{{used in buffer access here}}
358 // expected-warning@-1{{'t' is an unsafe pointer used for buffer access}}
359 foo(t[1]); // expected-note{{used in buffer access here}}
362 foo(ar[idx]); // expected-note{{used in buffer access here}}
368 // expected-warning@-1{{'t' is an unsafe pointer used for buffer access}}
369 return t[1]; // expected-note{{used in buffer access here}}
378 foo(cArr[idx][idx + 1]); // expected-note{{used in buffer access here}}
380 auto cPtr = cArr[idx][idx * 2]; // expected-note{{used in buffer access here}}
391 void testArrayPtrArithmetic(int x[]) { // expected-warning{{'x' is an unsafe pointer used for buffer access}}
392 foo (x + 3); // expected-note{{used in pointer arithmetic here}}
395 foo(y + 4); // expected-note{{used in pointer arithmetic here}}
403 ap1 = p; // expected-warning{{'ap1' is an unsafe pointer used for buffer access}} \
406 foo(ap1[1]); // expected-note{{used in buffer access here}}