]> granicus.if.org Git - clang/commitdiff
Enhance null-dereference checker test.
authorTed Kremenek <kremenek@apple.com>
Sat, 16 Aug 2008 00:45:40 +0000 (00:45 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 16 Aug 2008 00:45:40 +0000 (00:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54834 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/null-deref-ps.c

index 6da44d0c73fdd9bdc69753cd3d6c9428b546d4b5..92e8daa57e2f4854eae48895af5d9d05673b9c90 100644 (file)
@@ -77,4 +77,12 @@ int f7(int x) {
   return x;
 }
 
-
+int f8(int *p, int *q) {
+  if (!p)
+    if (p)
+      *p = 1; // no-warning
+  
+  if (q)
+    if (!q)
+      *q = 1; // no-warning
+}