On Apr 4, 2013, at 18:59 , Anton Yartsev <[email protected]> wrote:

> void test12365078_nocheck_nomalloc(unichar *characters) {
>   NSString *string = [[NSString alloc] initWithCharactersNoCopy:characters 
> length:12 freeWhenDone:1];
>   free(characters); // expected-warning {{Attempt to free non-owned memory}}
> }

Hm, no, this warning is correct. Perhaps the "non-owned" warning is really 
dependent on the deallocator, not the region being freed.

(This is the second or third time I've forgotten this case. Thanks for being 
patient with me.)

Jordan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to