[PATCH] D41627: [Modules TS] Fix namespace visibility
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 27 16:56:12 PDT 2018
rsmith added inline comments.
================
Comment at: lib/AST/DeclBase.cpp:285
+Decl::ModuleOwnershipKind Decl::getModuleOwnershipKindForChildOf(DeclContext *DC) {
+ // Ignore namespaces because they're visible by default.
+ while (DC && DC->isNamespace())
----------------
"because they're" -> "because they might be" -- this only applies to Modules TS modules, not to header modules.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:8629
+ // regardless of whether or not it's explicitly exported.
+ if (getLangOpts().ModulesTS &&
+ !Namespc->isAnonymousNamespace() && !Namespc->isInAnonymousNamespace()) {
----------------
This should depend on the kind of module we're in, not whether `-fmodules-ts` is enabled.
https://reviews.llvm.org/D41627
More information about the cfe-commits
mailing list