outofbound.c revision 6c07bdba93b095b66e2c8c82dd5ed458fa8285ea
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{{Load or store into an out-of-bound memory position.}} 7} 8