[cfe-commits] r66139 - /cfe/trunk/test/Analysis/retain-release-region-store.m
Ted Kremenek
kremenek at apple.com
Wed Mar 4 21:14:55 PST 2009
Author: kremenek
Date: Wed Mar 4 23:14:55 2009
New Revision: 66139
URL: http://llvm.org/viewvc/llvm-project?rev=66139&view=rev
Log:
Test case: When using RegionStore with the retain/release checker, stop tracking objects assigned to self's ivar.
Modified:
cfe/trunk/test/Analysis/retain-release-region-store.m
Modified: cfe/trunk/test/Analysis/retain-release-region-store.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release-region-store.m?rev=66139&r1=66138&r2=66139&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release-region-store.m (original)
+++ cfe/trunk/test/Analysis/retain-release-region-store.m Wed Mar 4 23:14:55 2009
@@ -99,3 +99,20 @@
return t;
}
+// Test that assigning to an self.ivar loses track of an object.
+// This is a temporary hack to reduce false positives.
+ at interface Test3 : NSObject {
+ id myObj;
+}
+- (void)test_self_assign_ivar;
+ at end
+
+ at implementation Test3
+- (void)test_self_assign_ivar {
+ CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
+ CFDateRef date = CFDateCreate(0, t); // no-warning
+ myObj = (id) date;
+}
+ at end
+
+
More information about the cfe-commits
mailing list