Add RegionStore test that illustrates a bogus array-out-of-bounds error.

llvm-svn: 70795
This commit is contained in:
Ted Kremenek 2009-05-03 19:24:34 +00:00
parent 5b73b5e197
commit 055797b789
1 changed files with 11 additions and 0 deletions

View File

@ -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
}