]> granicus.if.org Git - clang/commitdiff
Put the region store specific test in a separate file.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 6 Feb 2009 08:56:58 +0000 (08:56 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 6 Feb 2009 08:56:58 +0000 (08:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63930 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/null-deref-ps.c
test/Analysis/region-only-test.c [new file with mode: 0644]

index 0c23690d45442e8f627ddd1f123b1b561304d414..6daedf0f93e3514d6f6e9ed53e81a243f816a5d0 100644 (file)
@@ -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 (file)
index 0000000..0eabb7b
--- /dev/null
@@ -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
+}