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