outofbound.c revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
1// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -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