r187684 - ObjectiveC migrator. Differentiate 'instancetype'
Fariborz Jahanian
fjahanian at apple.com
Fri Aug 2 15:34:18 PDT 2013
Author: fjahanian
Date: Fri Aug 2 17:34:18 2013
New Revision: 187684
URL: http://llvm.org/viewvc/llvm-project?rev=187684&view=rev
Log:
ObjectiveC migrator. Differentiate 'instancetype'
from 'id' result type when deciding on migration
to instancetype.
Modified:
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=187684&r1=187683&r2=187684&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Fri Aug 2 17:34:18 2013
@@ -628,7 +628,9 @@ void ObjCMigrateASTConsumer::migrateFact
ObjCContainerDecl *CDecl,
ObjCMethodDecl *OM,
ObjCInstanceTypeFamily OIT_Family) {
- if (OM->isInstanceMethod() || !OM->getResultType()->isObjCIdType())
+ if (OM->isInstanceMethod() ||
+ OM->getResultType() == Ctx.getObjCInstanceType() ||
+ !OM->getResultType()->isObjCIdType())
return;
// Candidate factory methods are + (id) NaMeXXX : ... which belong to a class
More information about the cfe-commits
mailing list