[cfe-commits] r56294 - /cfe/trunk/test/Analysis/null-deref-ps.c
Ted Kremenek
kremenek at apple.com
Wed Sep 17 15:24:14 PDT 2008
Author: kremenek
Date: Wed Sep 17 17:24:13 2008
New Revision: 56294
URL: http://llvm.org/viewvc/llvm-project?rev=56294&view=rev
Log:
Add path-sensitivity test case.
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=56294&r1=56293&r2=56294&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/null-deref-ps.c (original)
+++ cfe/trunk/test/Analysis/null-deref-ps.c Wed Sep 17 17:24:13 2008
@@ -100,3 +100,14 @@
return *p++; // no-warning
}
+
+int f9b(int len) {
+ assert (len > 0); // note use of '>'
+ int *p = 0;
+
+ for (int i = 0; i < len; ++i)
+ p = qux(i);
+
+ return *p++; // no-warning
+}
+
More information about the cfe-commits
mailing list