[cfe-dev] Self-init check should only run on NSObject subclasses
kyrtzidis at apple.com
Tue Jan 25 15:58:16 PST 2011
Committed with that change in r124249. Thanks!
On Jan 25, 2011, at 3:47 PM, Argyrios Kyrtzidis wrote:
> On Jan 25, 2011, at 3:09 AM, Jean-Daniel Dupas wrote:
>> Actually, the self-init check is performed on all classes. But NSProxy does not even implement -init. So, in proxy subclasses, it is not possible to call [super init].
>> I attach a patch to disable this check on classes that does not inherit NSObject.
> Looks good, apart from a nitpick:
> - if (!MD->getClassInterface()->getSuperClass())
> + // self = [super init] applies only to NSObject subclasses.
> + // For instance, NSProxy doesn't implement -init.
> + ASTContext& Ctx = C.getASTContext();
> You can get the ASTContext using MD->getASTContext() and avoid passing "CheckerContext &C" around.
>> -- Jean-Daniel
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev