[cfe-commits] r65048 - /cfe/trunk/test/Analysis/retain-release.m

Ted Kremenek kremenek at apple.com
Thu Feb 19 10:20:28 PST 2009


Author: kremenek
Date: Thu Feb 19 12:20:28 2009
New Revision: 65048

URL: http://llvm.org/viewvc/llvm-project?rev=65048&view=rev
Log:
Update test case to include a leak that occurs at the place of allocation.

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=65048&r1=65047&r2=65048&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/retain-release.m (original)
+++ cfe/trunk/test/Analysis/retain-release.m Thu Feb 19 12:20:28 2009
@@ -236,4 +236,8 @@
   CFMutableArrayRef A = CFArrayCreateMutable(0, 10, &kCFTypeArrayCallBacks);
   [(id) A autorelease]; // no-warning
 }
-  
+
+// This case exercises the logic where the leak site is the same as the allocation site.
+void f14_leakimmediately() {
+  CFArrayCreateMutable(0, 10, &kCFTypeArrayCallBacks); // expected-warning{{leak}}
+}





More information about the cfe-commits mailing list