[ObjectiveC migrator] relax the rules for setter/getter
types when deciding on validity of a property
inclusion. // rdar://14345082


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185599 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp
index 8702ac3..696666e 100644
--- a/lib/ARCMigrate/ObjCMT.cpp
+++ b/lib/ARCMigrate/ObjCMT.cpp
@@ -211,9 +211,14 @@
       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.
       }