hamzasood updated this revision to Diff 156689.
hamzasood added a comment.
- Don't assume that -fmodules-ts implies that we're in a TS module.
- Don't ignore private namespaces when calculating the ownership kind.
https://reviews.llvm.org/D41627
Files:
include/clang/AST/DeclBase.h
lib/AST/D
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'r
hamzasood created this revision.
hamzasood added reviewers: rsmith, bruno, boris.
Namespaces without an explicit `export` were being mistakenly marked as module
private.
This patch fixes the visibility as per `[basic.namespace]p1` and adds a test
case with previously rejected (yet valid) code.