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
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.
}