outofbound.c revision 58e689fead1490611bcd114fb707bfc08a12049e
1// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s 2 3char f1() { 4 char* s = "abcd"; 5 char c = s[4]; // no-warning 6 return s[5] + c; // expected-warning{{Access out-of-bound array element (buffer overflow)}} 7} 8