diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-03 19:24:34 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-03 19:24:34 +0000 |
commit | 96682554198b20764c1b8cbb3f77e4c3dd76d42b (patch) | |
tree | 2ef8ef02d0f104eb143e053f2ed4e2ea6bfa0485 | |
parent | 3b660efb9f9fa3e87096f4a96a2093cd17c43c2e (diff) |
Add RegionStore test that illustrates a bogus array-out-of-bounds error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70795 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/xfail_regionstore_bogus_array_bounds_failure.c | 11 |
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 +} |