diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-22 20:27:48 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-22 20:27:48 +0000 |
commit | 92d48a71f551093efbbbd53f402c4257cf91f8d3 (patch) | |
tree | 565a0f0e2b8b0c95fe6b9104a8ce2db253fcfa38 /clang/test | |
parent | 483e12e09e0d9016a754be6c45e967435f8d31e0 (diff) | |
download | bcm5719-llvm-92d48a71f551093efbbbd53f402c4257cf91f8d3.tar.gz bcm5719-llvm-92d48a71f551093efbbbd53f402c4257cf91f8d3.zip |
Fix RegionStore::getLValueElement() to handle the case when the base region is not an ElementRegion (also do some cleanups of its core logic).
This gets array-struct.c to work with RegionStore.
llvm-svn: 62781
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Analysis/array-struct.c | 5 | ||||
-rw-r--r-- | clang/test/Analysis/outofbound.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c index 1d5e9448e92..4257220f9bd 100644 --- a/clang/test/Analysis/array-struct.c +++ b/clang/test/Analysis/array-struct.c @@ -1,5 +1,6 @@ -// RUN: clang -analyze -checker-simple -verify %s -// DISABLE: clang -analyze -checker-simple -analyzer-store-region -verify %s +// RUN: clang -analyze -checker-simple -analyzer-store-basic -verify %s && +// RUN: clang -analyze -checker-cfref -analyzer-store-basic -verify %s && +// RUN: clang -analyze -checker-cfref -analyzer-store-region -verify %s struct s { int data; diff --git a/clang/test/Analysis/outofbound.c b/clang/test/Analysis/outofbound.c index ab9c0cfa4c8..b0c2db43862 100644 --- a/clang/test/Analysis/outofbound.c +++ b/clang/test/Analysis/outofbound.c @@ -2,5 +2,5 @@ char f1() { char* s = "abcd"; - return s[5]; // expected-warning{{Load or store into an out-of-bound memory position.}} + return s[6]; // expected-warning{{Load or store into an out-of-bound memory position.}} } |