From e181de7f4fe9c75327836e5493c2783bcefc9293 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 22 Apr 2019 22:50:11 +0000 Subject: [c++2a] Implement semantic restrictions for 'export' declarations. llvm-svn: 358932 --- clang/lib/Sema/SemaDeclCXX.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Sema/SemaDeclCXX.cpp') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 9f9e117ab9f..797bbbeca95 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -9037,6 +9037,9 @@ void Sema::ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace) { PopDeclContext(); if (Namespc->hasAttr()) PopPragmaVisibility(true, RBrace); + // If this namespace contains an export-declaration, export it now. + if (DeferredExportedNamespaces.erase(Namespc)) + Dcl->setModuleOwnershipKind(Decl::ModuleOwnershipKind::VisibleWhenImported); } CXXRecordDecl *Sema::getStdBadAlloc() const { -- cgit v1.2.3