On Mar 19, 2012, at 5:26 PM, Jordan Rose <[email protected]> wrote:

> 
> On Mar 19, 2012, at 17:10, Ted Kremenek wrote:
> 
>> +int rdar10553686_positive(void)
>> +{
>> +  NSObject* bar = static_objc_cast<NSObject*>([[NSObject alloc] init]); // 
>> expected-warning {{Potential leak}}
>> +  [bar release];
>> +  [bar retain];
>> +  return 0;
>> +}
> 
> Why is this not a use-after-free? Even if there is a valid test here, we 
> shouldn't use an invalid test case. Or am I missing something?

No, it's another bug in the checker.  My brain's not operating.  Apparently we 
are still treating the pointer as "may escape" even though we are inlining the 
call to static_objc_cast.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to