[cfe-commits] r63930 - in /cfe/trunk/test/Analysis: null-deref-ps.c region-only-test.c

Zhongxing Xu xuzhongxing at gmail.com
Fri Feb 6 00:56:58 PST 2009


Author: zhongxingxu
Date: Fri Feb  6 02:56:58 2009
New Revision: 63930

URL: http://llvm.org/viewvc/llvm-project?rev=63930&view=rev
Log:
Put the region store specific test in a separate file.

Added:
    cfe/trunk/test/Analysis/region-only-test.c
Modified:
    cfe/trunk/test/Analysis/null-deref-ps.c

Modified: cfe/trunk/test/Analysis/null-deref-ps.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/null-deref-ps.c?rev=63930&r1=63929&r2=63930&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/null-deref-ps.c (original)
+++ cfe/trunk/test/Analysis/null-deref-ps.c Fri Feb  6 02:56:58 2009
@@ -212,12 +212,3 @@
   *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
-}

Added: cfe/trunk/test/Analysis/region-only-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/region-only-test.c?rev=63930&view=auto

==============================================================================
--- cfe/trunk/test/Analysis/region-only-test.c (added)
+++ cfe/trunk/test/Analysis/region-only-test.c Fri Feb  6 02:56:58 2009
@@ -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
+}





More information about the cfe-commits mailing list