Zhongxing Xu | ff805e7 | 2008-11-24 02:19:49 +0000 | [diff] [blame] | 1 | // RUN: clang -checker-simple -analyzer-store-region -verify %s |
2 | |||||
3 | char f1() { | ||||
4 | char* s = "abcd"; | ||||
Zhongxing Xu | 910eee6 | 2008-11-24 05:16:01 +0000 | [diff] [blame] | 5 | return s[5]; // expected-warning{{Load or store into an out-of-bound memory position.}} |
Zhongxing Xu | ff805e7 | 2008-11-24 02:19:49 +0000 | [diff] [blame] | 6 | } |