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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to