Test more array logic in outofbound.c

llvm-svn: 62782
This commit is contained in:
Ted Kremenek 2009-01-22 20:36:33 +00:00
parent 92d48a71f5
commit e54b87f477
1 changed files with 2 additions and 1 deletions
clang/test/Analysis

View File

@ -2,5 +2,6 @@
char f1() {
char* s = "abcd";
return s[6]; // expected-warning{{Load or store into an out-of-bound memory position.}}
char c = s[4]; // no-warning
return s[5] + c; // expected-warning{{Load or store into an out-of-bound memory position.}}
}