diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-07-05 07:47:11 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-07-05 07:47:11 +0000 |
commit | c5dd58546ce4d20cd71cc26cb790e7f91c8f908f (patch) | |
tree | a0e99619e42cf34795c1d662079bbec52905a30e /include | |
parent | 50f735245d0803846df474e9f3229ac7f4d9f9b0 (diff) |
[modules ts] Improve merging of module-private declarations.
These cases occur frequently for declarations in the global module (above the
module-declaration) in a Modules TS module interface. When we merge a
definition from another module into such a module-private definition, ensure
that we transitively make everything lexically within that definition visible
to that translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/DeclBase.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 8658d886a9..041f0fd484 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -749,7 +749,7 @@ public: /// Set that this declaration is globally visible, even if it came from a /// module that is not visible. void setVisibleDespiteOwningModule() { - if (getModuleOwnershipKind() == ModuleOwnershipKind::VisibleWhenImported) + if (isHidden()) setModuleOwnershipKind(ModuleOwnershipKind::Visible); } |