aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.}}
}