diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-12 10:10:00 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-12 10:10:00 +0000 |
commit | 264e93799c891c03d60cf0b09a032b0a9935d3b5 (patch) | |
tree | ef0ff7156733c90168b8c928869b3c2d78e571fb /test/Analysis/array-struct.c | |
parent | 6738b731a6f6621ae920391906132a9cdc09185f (diff) |
Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.
Also fix some 80 columns violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71548 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/array-struct.c')
-rw-r--r-- | test/Analysis/array-struct.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c index 2b1aea75db..318f92f907 100644 --- a/test/Analysis/array-struct.c +++ b/test/Analysis/array-struct.c @@ -132,3 +132,13 @@ static struct s3 opt; void f14() { struct s3 my_opt = opt; } + +void bar(int*); + +// Test if the array is correctly invalidated. +void f15() { + int a[10]; + bar(a); + if (a[1]) // no-warning + 1; +} |