Author: kremenek
Date: Fri Dec 3 00:53:12 2010
New Revision: 120796
URL: http://llvm.org/viewvc/llvm-project?rev=120796&view=rev
Log:
Add test case for r120795.
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=120796&r1=120795&r2=120796&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release.m (original)
+++ cfe/trunk/test/Analysis/retain-release.m Fri Dec 3 00:53:12 2010
@@ -1386,3 +1386,27 @@
}
@end
+// <rdar://problem/8724287> - This test case previously crashed because
+// of a bug in BugReporter.
+extern const void *CFDictionaryGetValue(CFDictionaryRef theDict, const void
*key);
+typedef struct __CFError * CFErrorRef;
+extern const CFStringRef kCFErrorUnderlyingErrorKey;
+extern CFDictionaryRef CFErrorCopyUserInfo(CFErrorRef err);
+
+static void rdar_8724287(CFErrorRef error)
+{
+ CFErrorRef error_to_dump;
+
+ error_to_dump = error;
+ while (error_to_dump != ((void*)0)) {
+ CFDictionaryRef info;
+
+ info = CFErrorCopyUserInfo(error_to_dump); //
expected-warning{{Potential leak of an object allocated on line 1404 and stored
into 'info'}}
+
+ if (info != ((void*)0)) {
+ }
+
+ error_to_dump = (CFErrorRef) CFDictionaryGetValue(info,
kCFErrorUnderlyingErrorKey);
+ }
+}
+
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits