ObjectiveC migrator. Don't suggest @property for

methods which look like getters but belong to
known family of methods. // rdar://15044058

llvm-svn: 191347
This commit is contained in:
Fariborz Jahanian 2013-09-25 00:17:07 +00:00
parent 18d37b539e
commit 7391a7b5aa
3 changed files with 12 additions and 0 deletions

View File

@ -772,6 +772,12 @@ bool ObjCMigrateASTConsumer::migrateProperty(ASTContext &Ctx,
return false;
Selector GetterSelector = Method->getSelector();
ObjCInstanceTypeFamily OIT_Family =
Selector::getInstTypeMethodFamily(GetterSelector);
if (OIT_Family != OIT_None)
return false;
IdentifierInfo *getterName = GetterSelector.getIdentifierInfoForSlot(0);
Selector SetterSelector =
SelectorTable::constructSetterSelector(PP.getIdentifierTable(),

View File

@ -207,4 +207,7 @@ DEPRECATED
- (id)method1 ALIGNED NS_AVAILABLE;
- (void) setMethod1 : (id) object NS_AVAILABLE ALIGNED;
- (NSURL *)init; // No Change
+ (id)alloc; // No Change
@end

View File

@ -207,4 +207,7 @@ DEPRECATED
@property (nonatomic, retain) id method1 ALIGNED NS_AVAILABLE;
- (NSURL *)init; // No Change
+ (id)alloc; // No Change
@end