blob: e676ea3b3889f2c3efc12fe76d8639ef8ccf8777 [file] [log] [blame]
Ted Kremenek6c07bdb2009-06-26 00:05:51 +00001// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
Daniel Dunbard7390212009-11-03 07:25:45 +00002// XFAIL: *
Zhongxing Xu20f01782008-11-24 02:19:49 +00003
4char f1() {
5 char* s = "abcd";
Ted Kremenekf9e96842009-01-22 20:36:33 +00006 char c = s[4]; // no-warning
7 return s[5] + c; // expected-warning{{Load or store into an out-of-bound memory position.}}
Zhongxing Xu20f01782008-11-24 02:19:49 +00008}