summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-04-22 22:50:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-04-22 22:50:11 +0000
commite181de7f4fe9c75327836e5493c2783bcefc9293 (patch)
tree014979d3a317a1d57bcb86609e0d1f11c98ebd55 /clang/lib/Sema/SemaDeclCXX.cpp
parent68602ab2f3535291753a6149d1f445c5fd416152 (diff)
downloadbcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.tar.gz
bcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.zip
[c++2a] Implement semantic restrictions for 'export' declarations.
llvm-svn: 358932
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp3
1 files changed, 3 insertions, 0 deletions
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<VisibilityAttr>())
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 {
OpenPOWER on IntegriCloud