aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-07-05 01:42:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-07-05 01:42:07 +0000
commit16280f9d13d776349f9dacd3378e307d662f4769 (patch)
tree1da3e66d772c7bd2c6de87e18383451867121e8b /include
parent9ab24b50c19a33c6868f9dde7fce1dac915e6a6e (diff)
[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
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/DeclBase.h2
-rw-r--r--include/clang/Sema/Sema.h2
2 files changed, 3 insertions, 1 deletions
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<Module *> *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.