blob: ab9c0cfa4c8a975bc709e0aaaf5bc434c2677c7e [file] [log] [blame]
Daniel Dunbar9c321102009-01-20 23:17:32 +00001// RUN: clang -analyze -checker-simple -analyzer-store-region -verify %s
Zhongxing Xuff805e72008-11-24 02:19:49 +00002
3char f1() {
4 char* s = "abcd";
Zhongxing Xu910eee62008-11-24 05:16:01 +00005 return s[5]; // expected-warning{{Load or store into an out-of-bound memory position.}}
Zhongxing Xuff805e72008-11-24 02:19:49 +00006}