[cfe-commits] r70600 - /cfe/trunk/test/Analysis/misc-ps.m
Ted Kremenek
kremenek at apple.com
Fri May 1 16:35:18 PDT 2009
Author: kremenek
Date: Fri May 1 18:35:18 2009
New Revision: 70600
URL: http://llvm.org/viewvc/llvm-project?rev=70600&view=rev
Log:
Add another test case found due to an analyzer regression.
Modified:
cfe/trunk/test/Analysis/misc-ps.m
Modified: cfe/trunk/test/Analysis/misc-ps.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps.m?rev=70600&r1=70599&r2=70600&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps.m (original)
+++ cfe/trunk/test/Analysis/misc-ps.m Fri May 1 18:35:18 2009
@@ -272,3 +272,15 @@
}
}
+// Test invalidating pointers-to-pointers with slightly different types. This
+// example came from a recent false positive due to a regression where the
+// branch condition was falsely reported as being uninitialized.
+void invalidate_by_ref(char **x);
+int test_invalidate_by_ref() {
+ unsigned short y;
+ invalidate_by_ref((char**) &y);
+ if (y) // no-warning
+ return 1;
+ return 0;
+}
+
More information about the cfe-commits
mailing list