blob: 4ab2326fcd8907a612ff97d817642dcad9cedf35 [file] [log] [blame]
Ted Kremenek99ec8f42009-02-17 04:27:41 +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";
Ted Kremenek0e583552009-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 Xuff805e72008-11-24 02:19:49 +00007}