[cfe-commits] r117525 - /cfe/trunk/test/Analysis/retain-release.m
Ted Kremenek
kremenek at apple.com
Wed Oct 27 19:50:32 PDT 2010
Author: kremenek
Date: Wed Oct 27 21:50:32 2010
New Revision: 117525
URL: http://llvm.org/viewvc/llvm-project?rev=117525&view=rev
Log:
Add test case for <rdar://problem/8356342>.
Modified:
cfe/trunk/test/Analysis/retain-release.m
Modified: cfe/trunk/test/Analysis/retain-release.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release.m?rev=117525&r1=117524&r2=117525&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release.m (original)
+++ cfe/trunk/test/Analysis/retain-release.m Wed Oct 27 21:50:32 2010
@@ -1367,3 +1367,22 @@
GetAClassThatImplementsProt_R8272168();
}
+// Test case for <rdar://problem/8356342>, which in the past triggered
+// a false positive.
+ at interface RDar8356342
+- (NSDate*) rdar8356342:(NSDate *)inValue;
+ at end
+
+ at implementation RDar8356342
+- (NSDate*) rdar8356342:(NSDate*)inValue {
+ NSDate *outValue = inValue;
+ if (outValue == 0)
+ outValue = [[NSDate alloc] init]; // no-warning
+
+ if (outValue != inValue)
+ [outValue autorelease];
+
+ return outValue;
+}
+ at end
+
More information about the cfe-commits
mailing list