[PATCH] D49462: [ObjC] Error out when using forward-declared protocol in a @protocol expression
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 17 12:52:36 PDT 2018
arphaman added inline comments.
================
Comment at: lib/CodeGen/CGObjCMac.cpp:6788
+ "emitting protocol metadata without definition");
+ PD = PD->getDefinition();
----------------
rjmccall wrote:
> What happens in the `@implementation` case (the one that we're not diagnosing yet) when the protocol is a forward declaration?
We emit an `external global` reference to the protocol metadata using `GetOrEmitProtocolRef`, so this assertion won't be triggered until we force the emission of protocol metadata from implementation as planned in a follow-up patch.
Repository:
rC Clang
https://reviews.llvm.org/D49462
More information about the cfe-commits
mailing list