summaryrefslogtreecommitdiff
path: root/test/Analysis/out-of-bounds.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/out-of-bounds.c')
-rw-r--r--test/Analysis/out-of-bounds.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Analysis/out-of-bounds.c b/test/Analysis/out-of-bounds.c
index 8c65b478f1c25..ac2cdc82598d1 100644
--- a/test/Analysis/out-of-bounds.c
+++ b/test/Analysis/out-of-bounds.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,security.experimental.ArrayBoundV2 -verify %s
+// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,experimental.security.ArrayBoundV2 -verify %s
// Tests doing an out-of-bounds access after the end of an array using:
// - constant integer index
@@ -94,7 +94,6 @@ void test2_ptr(int x) {
p[-1] = 1; // expected-warning{{Out of bound memory access}}
}
-// ** FIXME ** Doesn't work yet because we don't support pointer arithmetic.
// Tests doing an out-of-bounds access before the start of an array using:
// - indirect pointer to buffer, manipulated using simple pointer arithmetic
// - constant integer index
@@ -103,7 +102,7 @@ void test2_ptr_arith(int x) {
int buf[100];
int *p = buf;
--p;
- p[0] = 1; // no-warning
+ p[0] = 1; // expected-warning {{Out of bound memory access (accessed memory precedes memory block)}}
}
// Tests doing an out-of-bounds access before the start of a multi-dimensional