summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 77ba6cf445d..a0594a02036 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -278,12 +278,12 @@ void Decl::setLexicalDeclContext(DeclContext *DC) {
// FIXME: We shouldn't be changing the lexical context of declarations
// imported from AST files.
if (!isFromASTFile()) {
- Hidden = cast<Decl>(DC)->Hidden && hasLocalOwningModuleStorage();
- if (Hidden)
+ setModuleOwnershipKind(getModuleOwnershipKindForChildOf(DC));
+ if (hasOwningModule())
setLocalOwningModule(cast<Decl>(DC)->getOwningModule());
}
- assert((!Hidden || getOwningModule()) &&
+ assert((!hasOwningModule() || getOwningModule()) &&
"hidden declaration has no owning module");
}
OpenPOWER on IntegriCloud