1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
3 typedef unsigned uintptr_t;
7 *p
= 0; // expected-warning{{Dereference of undefined pointer value}}
17 return p
->x
++; // expected-warning{{Access to field 'x' results in a dereference of an undefined pointer value (loaded from variable 'p')}}
24 return x
[i
+ 1]; // expected-warning{{Array access (from variable 'x') results in an undefined pointer dereference}}
31 return x
[i
+ 1]++; // expected-warning{{Array access (from variable 'x') results in an undefined pointer dereference}}