[PATCH] D67983: [ObjC] Diagnose implicit type coercion from ObjC 'Class' to object pointer types.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 14:45:23 PDT 2019
rjmccall added a comment.
I was thinking that we could walk through the instance methods of the protocol and check whether the class has compatible declarations of class methods. But you're right, of course: we don't actually know what class we're working with, and we'd have to look through `[NSFoo self]` / `[NSFoo class]` just to cover the common case of a "direct" reference to a class, which would be a novel step in assuming things about standard methods. So the only way we could do this in general would be to just assume that all classes conform to certain special protocols.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67983/new/
https://reviews.llvm.org/D67983
More information about the cfe-commits
mailing list