-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Description
| Bugzilla Link | 11577 |
| Resolution | FIXED |
| Resolved on | Feb 18, 2014 19:36 |
| Version | trunk |
| OS | MacOS X |
| Attachments | test case |
| Reporter | LLVM Bugzilla Contributor |
| CC | @efriedma-quic,@tkremenek,@seanm |
Extended Description
The result of +alloc should be inferred to be an instance of the receiving "self" class here, but is apparently just being typed as "id". This cause clang to think the -initWithContentsOfFile: and -initWithContentsOfURL: are possibly the deprecated methods in Foundation.
/Users/bungi/Source/LLVM/llvm/Release+Asserts/bin/clang -c incorrect-type-inferrence-vs-deprecation.m
incorrect-type-inferrence-vs-deprecation.m:32:14: warning: 'initWithContentsOfFile:' is deprecated [-Wdeprecated-declarations]
return [[[self alloc] initWithContentsOfFile:path] autorelease];
^
incorrect-type-inferrence-vs-deprecation.m:37:14: warning: 'initWithContentsOfURL:' is deprecated [-Wdeprecated-declarations]
return [[[self alloc] initWithContentsOfURL:url] autorelease];
^
2 warnings generated.