[cfe-commits] r78008 - /cfe/trunk/test/Analysis/misc-ps-region-store.m
Ted Kremenek
kremenek at apple.com
Mon Aug 3 15:23:25 PDT 2009
Author: kremenek
Date: Mon Aug 3 17:23:24 2009
New Revision: 78008
URL: http://llvm.org/viewvc/llvm-project?rev=78008&view=rev
Log:
Add test case testing field sensitivity. Reduced from <rdar://problem/7114618>.
Modified:
cfe/trunk/test/Analysis/misc-ps-region-store.m
Modified: cfe/trunk/test/Analysis/misc-ps-region-store.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps-region-store.m?rev=78008&r1=78007&r2=78008&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps-region-store.m (original)
+++ cfe/trunk/test/Analysis/misc-ps-region-store.m Mon Aug 3 17:23:24 2009
@@ -139,3 +139,18 @@
goto again;
}
}
+
+// Reduced test case from <rdar://problem/7114618>.
+// Basically a null check is performed on the field value, which is then
+// assigned to a variable and then checked again.
+struct s_7114618 { int *p; };
+void test_rdar_7114618(struct s_7114618 *s) {
+ if (s->p) {
+ int *p = s->p;
+ if (!p) {
+ // Infeasible
+ int *dead = 0;
+ *dead = 0xDEADBEEF; // no-warning
+ }
+ }
+}
More information about the cfe-commits
mailing list