[LLVMbugs] [Bug 10790] New: False Positive of Potential Leak from Property

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 26 20:02:30 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10790

           Summary: False Positive of Potential Leak from Property
           Product: clang
           Version: 2.9
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: neil.here.junk at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7161)
 --> (http://llvm.org/bugs/attachment.cgi?id=7161)
screenshot of analysis

The static analysis of the 'test' method says that an object is allocated on
line 18 is stored into newMergingList and then never used. However, it is used
in the next line and the retainCount should not be affected.

****


@interface testViewController : UIViewController

- (void)addProductCollection:(id)newProductCollection
removingExisting:(BOOL)removeExisting;
@property (nonatomic, retain) id newProductCollection;

@end

@implementation testViewController

@synthesize newProductCollection = _newProductCollection;

- (void)addProductCollection:(id)newProductCollection
removingExisting:(BOOL)removeExisting
{
}

- (void)test
{
    id newMergingList = self.newProductCollection;
    [self addProductCollection:newMergingList removingExisting:0];
}


@end

-- 
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