blob: 953075fe03d79be9a81748e7173dba45a275af61 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -analyze -checker-simple -analyzer-store=region -verify %s
Zhongxing Xu20f01782008-11-24 02:19:49 +00002
3char f1() {
4 char* s = "abcd";
Ted Kremenekf9e96842009-01-22 20:36:33 +00005 char c = s[4]; // no-warning
6 return s[5] + c; // expected-warning{{Load or store into an out-of-bound memory position.}}
Zhongxing Xu20f01782008-11-24 02:19:49 +00007}