diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-01 08:20:27 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-01 08:20:27 +0000 |
| commit | 640aad76674b9e580f50123dd05d6da5580857fe (patch) | |
| tree | 1f31e6c99bfb86f910d89cd4c5102cbe83180767 /clang/test/Analysis/no-outofbounds.c | |
| parent | 920070cfe7c3c03f77acc41f45fbf6337ff08abd (diff) | |
| download | bcm5719-llvm-640aad76674b9e580f50123dd05d6da5580857fe.tar.gz bcm5719-llvm-640aad76674b9e580f50123dd05d6da5580857fe.zip | |
Use the element type to compute the array size when the base region is a VarRegion.
Patch by Jordy Rose.
llvm-svn: 100099
Diffstat (limited to 'clang/test/Analysis/no-outofbounds.c')
| -rw-r--r-- | clang/test/Analysis/no-outofbounds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Analysis/no-outofbounds.c b/clang/test/Analysis/no-outofbounds.c index f9ac589797a..771323b8111 100644 --- a/clang/test/Analysis/no-outofbounds.c +++ b/clang/test/Analysis/no-outofbounds.c @@ -1,6 +1,5 @@ // RUN: %clang_cc1 -analyzer-check-objc-mem -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s // RUN: %clang_cc1 -analyzer-check-objc-mem -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s -// XFAIL: * //===----------------------------------------------------------------------===// // This file tests cases where we should not flag out-of-bounds warnings. @@ -10,4 +9,6 @@ void f() { long x = 0; char *y = (char*) &x; char c = y[0] + y[1] + y[2]; // no-warning + short *z = (short*) &x; + short s = z[0] + z[1]; // no-warning } |

