forked from OSchip/llvm-project
Add RegionStore test that illustrates a bogus array-out-of-bounds error.
llvm-svn: 70795
This commit is contained in:
parent
5b73b5e197
commit
055797b789
|
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue