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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62781 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c
index 1d5e944..4257220 100644
--- a/test/Analysis/array-struct.c
+++ b/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/test/Analysis/outofbound.c b/test/Analysis/outofbound.c
index ab9c0cf..b0c2db4 100644
--- a/test/Analysis/outofbound.c
+++ b/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.}}
}