[LLVMbugs] [Bug 11870] New: false positive leak checking for objects in collection classes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 27 07:55:44 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11870
Bug #: 11870
Summary: false positive leak checking for objects in collection
classes
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: mayer.julian at googlemail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
checker claims there is a leak in this piece of code although there obviously
isn't:
NSObject *o = [[NSObject alloc] init];
NSArray *a = [[NSArray alloc] initWithObjects:o, nil];
for (NSObject *i in a)
[i release];
[a release];
main.m:15:23: warning: Potential leak of an object allocated on line 15 and
stored into 'o'
NSObject *o = [[NSObject alloc] init];
^
1 warning generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list