summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ObjCMT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/ARCMigrate/ObjCMT.cpp')
-rw-r--r--clang/lib/ARCMigrate/ObjCMT.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp
index 8702ac3f8f9..696666ecde7 100644
--- a/clang/lib/ARCMigrate/ObjCMT.cpp
+++ b/clang/lib/ARCMigrate/ObjCMT.cpp
@@ -211,9 +211,14 @@ void ObjCMigrateASTConsumer::migrateObjCInterfaceDecl(ASTContext &Ctx,
if (!SRT->isVoidType())
continue;
const ParmVarDecl *argDecl = *SetterMethod->param_begin();
- // FIXME. Can relax rule for matching getter/setter type further.
- if (!Ctx.hasSameType(argDecl->getType(), GRT))
- continue;
+ QualType ArgType = argDecl->getType();
+ if (!Ctx.hasSameType(ArgType, GRT)) {
+ bool Valid =
+ ((GRT->isObjCIdType() && ArgType->isObjCObjectPointerType())
+ || (ArgType->isObjCIdType() && GRT->isObjCObjectPointerType()));
+ if (!Valid)
+ continue;
+ }
// we have a matching setter/getter pair.
// TODO. synthesize a suitable property declaration here.
}
OpenPOWER on IntegriCloud