[cfe-commits] r70795 - /cfe/trunk/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c

Ted Kremenek kremenek at apple.com
Sun May 3 12:24:35 PDT 2009


Author: kremenek
Date: Sun May  3 14:24:34 2009
New Revision: 70795

URL: http://llvm.org/viewvc/llvm-project?rev=70795&view=rev
Log:
Add RegionStore test that illustrates a bogus array-out-of-bounds error.

Added:
    cfe/trunk/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c

Added: cfe/trunk/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c?rev=70795&view=auto

==============================================================================
--- cfe/trunk/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c (added)
+++ cfe/trunk/test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c Sun May  3 14:24:34 2009
@@ -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
+}





More information about the cfe-commits mailing list