Lines Matching defs:q
52 void * q = p;
54 foo(((int*)q)[10]); // expected-warning{{unsafe buffer access}}
102 void testQualifiedParameters(const int * p, const int * const q, const int a[10], const int b[10][10]) {
104 // expected-warning@-2{{'q' is an unsafe pointer used for buffer access}}
109 q[1], 1[q], q[-1], // expected-note3{{used in buffer access here}}
247 void testPointerArithmetic(int * p, const int **q, T * x) {
254 *q + 1, 1 + *q, *q - 1, // expected-warning3{{unsafe pointer arithmetic}}
261 *q += 1; *q -= 1; // expected-warning2{{unsafe pointer arithmetic}}
271 const int **q = const_cast<const int **>(&p);
273 testPointerArithmetic(p, q, p); //FIXME: expected note{{in instantiation of}}
283 int * S_t::* q = &S_t::y;
286 (S.*q)[1]); // expected-warning{{unsafe buffer access}}
304 int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
305 q++; // expected-note{{used in pointer arithmetic here}}
306 return *q;
312 int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
313 q++; // expected-note{{used in pointer arithmetic here}}
314 return *q;
319 int * q = p; // expected-warning{{'q' is an unsafe pointer used for buffer access}}
320 q++; // expected-note{{used in pointer arithmetic here}}
321 return *q;
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}}
341 return *q;
351 int * q = p++; // expected-note{{used in pointer arithmetic here}}