aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-02-06 08:56:58 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-02-06 08:56:58 +0000
commitbcd2f76edbd1bcf966183444d5d1afcc1edc050d (patch)
treea13560261e5627ad36feb75844e5408ca5d223be
parent02ebefbb989368b03de8e0c13c1d8a1cba8b7373 (diff)
Put the region store specific test in a separate file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63930 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/null-deref-ps.c9
-rw-r--r--test/Analysis/region-only-test.c13
2 files changed, 13 insertions, 9 deletions
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c
index 0c23690d45..6daedf0f93 100644
--- a/test/Analysis/null-deref-ps.c
+++ b/test/Analysis/null-deref-ps.c
@@ -212,12 +212,3 @@ void f12(HF12ITEM i, char *q) {
*p = 1; // no-warning
}
-// Exercise ElementRegion with SymbolicRegion as super region.
-void foo(int* p) {
- int *x;
- int a;
- if (p[0] == 1)
- x = &a;
- if (p[0] == 1)
- *x; // no-warning
-}
diff --git a/test/Analysis/region-only-test.c b/test/Analysis/region-only-test.c
new file mode 100644
index 0000000000..0eabb7b888
--- /dev/null
+++ b/test/Analysis/region-only-test.c
@@ -0,0 +1,13 @@
+// RUN: clang -analyze -checker-simple -analyzer-store-region -verify %s
+
+// Region store must be enabled for tests in this file.
+
+// Exercise creating ElementRegion with symbolic super region.
+void foo(int* p) {
+ int *x;
+ int a;
+ if (p[0] == 1)
+ x = &a;
+ if (p[0] == 1)
+ *x; // no-warning
+}