From 16280f9d13d776349f9dacd3378e307d662f4769 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 5 Jul 2017 01:42:07 +0000 Subject: [modules ts] Declarations from a module interface unit are only visible outside the module if declared in an export block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307115 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/DeclBase.h | 2 +- include/clang/Sema/Sema.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 0f1f481ae4..8658d886a9 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 (hasOwningModule()) + if (getModuleOwnershipKind() == ModuleOwnershipKind::VisibleWhenImported) setModuleOwnershipKind(ModuleOwnershipKind::Visible); } diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 1fc0b2e502..da961ab7e8 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -1266,6 +1266,7 @@ public: void emitAndClearUnusedLocalTypedefWarnings(); + void ActOnStartOfTranslationUnit(); void ActOnEndOfTranslationUnit(); void CheckDelegatingCtorCycles(); @@ -1541,6 +1542,7 @@ public: llvm::SmallVectorImpl *Modules); bool hasVisibleMergedDefinition(NamedDecl *Def); + bool hasMergedDefinitionInCurrentModule(NamedDecl *Def); /// Determine if \p D and \p Suggested have a structurally compatible /// layout as described in C11 6.2.7/1. -- cgit v1.2.3