aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-22 20:36:33 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-22 20:36:33 +0000
commitf9e96843e8a0afd0d5f58ba224fb8d57cba8effa (patch)
tree1ef657d5ced5eec77acb25d2a0c86c4fda76febf
parenta7ac9444b4b82de868fac9710a56807898a90b02 (diff)
Test more array logic in outofbound.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62782 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/outofbound.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Analysis/outofbound.c b/test/Analysis/outofbound.c
index b0c2db4386..e496425eb9 100644
--- a/test/Analysis/outofbound.c
+++ b/test/Analysis/outofbound.c
@@ -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.}}
}