[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context
Bruno Cardoso Lopes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 29 11:37:08 PDT 2018
bruno added inline comments.
================
Comment at: lib/Sema/SemaDeclObjC.cpp:1208
+ // serialize something meaningful.
+ if (getLangOpts().Modules)
+ PushOnScopeChains(PDecl, TUScope);
----------------
arphaman wrote:
> Is this a problem only for modules or does this show up in PCHs too? What would be the cost of using PushOnScopeChains unconditionally?
> Is this a problem only for modules or does this show up in PCHs too?
It only shows up in PCHs if Modules are being used, otherwise works as expected, because we don't have to serialize a different module which contains the dup, we just ignore it.
> What would be the cost of using PushOnScopeChains unconditionally?
I'm afraid that without the modules visibility rules, adding it unconditionally will make it available for name lookup, which we don't want here.
Repository:
rC Clang
https://reviews.llvm.org/D47297
More information about the cfe-commits
mailing list