[cfe-commits] r79954 - /cfe/trunk/test/Analysis/null-deref-ps.c

Ted Kremenek kremenek at apple.com
Mon Aug 24 15:56:32 PDT 2009


Author: kremenek
Date: Mon Aug 24 17:56:32 2009
New Revision: 79954

URL: http://llvm.org/viewvc/llvm-project?rev=79954&view=rev
Log:
Add test case for PR 4759.

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=79954&r1=79953&r2=79954&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/null-deref-ps.c (original)
+++ cfe/trunk/test/Analysis/null-deref-ps.c Mon Aug 24 17:56:32 2009
@@ -272,4 +272,13 @@
   if (((((int) x) << 2) + 1) >> 1) *x = 1; // no-warning
 }
 
+// PR 4759 - Attribute non-null checking by the analyzer was not correctly
+// handling pointer values that were undefined.
+void pr4759_aux(int *p) __attribute__((nonnull));
+
+void pr4759() {
+  int *p;
+  pr4759_aux(p); // expected-warning{{undefined}}
+}
+
 





More information about the cfe-commits mailing list