jyknight added a comment. In D67983#1723681 <https://reviews.llvm.org/D67983#1723681>, @rjmccall wrote:
> We could probably do a quick check to see if the class informally conforms to > the protocol. `+copyWithZone` seems to be marked unavailable in ARC; not > sure if that would cause problems for such a check. What kind of check did you have in mind? We might hard-code the compiler to think that the "Class" type "implements" NSObject/NSCopying and thus is implicitly convertible to `id<NSObject>` and `id<NSCopying>`. That usually would be OK since the default metaclass in the normal runtime in fact does so. However, there's no such guarantee, and that kind of hardcoding seems generally kinda sketchy. Given that this code was already being diagnosed for a long time in ObjC mode, I'm not sure that adding such a hack is really warranted. I'll add a bit to the release notes, though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67983/new/ https://reviews.llvm.org/D67983 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits