Open llvmbot opened 15 years ago
Based on Ted's commit message in r68492, this is a known issue.
Indeed. I've disabled analyzer support for @try...@finally until I have time to implement it correctly.
Based on Ted's commit message in r68492, this is a known issue.
assigned to @tkremenek
Extended Description
When some objects are allocated before or inside a @try block,
-checker-cfref doesn't "see" the code in the @finally block which deallocates these objects.
Test case, reporting false positives:
// RUN: clang-cc -analyze -checker-cfref -verify %s
import <Foundation/Foundation.h>
void f1() { int i = 1; while(i-- > 0) { NSAutoreleasePool innerPool = [[NSAutoreleasePool alloc] init]; // no-warning. Currently produces: Potential leak of object allocated on line 10 and stored into 'innerPool' NSArray array = nil;
} }
Clang revision: 68443