[cfe-dev] Objective-C really strong type checking
Marcin Ĺwiderski
marcin.sfider at gmail.com
Wed Sep 8 02:01:44 PDT 2010
Hi All
Is there a check implemented in Clang Checker (maybe not released for XCode
yet) that would find errors like in example:
@interface SomeClass : NSObject {
NSMutableDictionary *_someObjects;
}
@end
@implementation SomeClass
- (id)init {
if ((self = [super init])) {
_someObject = [NSMutableArray new];
}
return self;
}
@end
Methods 'new' or 'init' return object of type 'id' by convention, but as I
experienced it myself it can be unsafe.
Cheers
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100908/ac7b7756/attachment.html>
More information about the cfe-dev
mailing list