aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c b/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c
new file mode 100644
index 0000000000..0eb36519ca
--- /dev/null
+++ b/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c
@@ -0,0 +1,11 @@
+// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s
+// XFAIL
+
+// What we are seeing: Load or store into an out-of-bound memory position
+// This is bogus.
+
+void f() {
+ long x = 0;
+ char *y = (char*) &x;
+ char c = y[0] + y[1] + y[2]; // no-warning
+}