diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-22 22:50:11 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-22 22:50:11 +0000 |
commit | e181de7f4fe9c75327836e5493c2783bcefc9293 (patch) | |
tree | 014979d3a317a1d57bcb86609e0d1f11c98ebd55 /clang/lib/AST | |
parent | 68602ab2f3535291753a6149d1f445c5fd416152 (diff) | |
download | bcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.tar.gz bcm5719-llvm-e181de7f4fe9c75327836e5493c2783bcefc9293.zip |
[c++2a] Implement semantic restrictions for 'export' declarations.
llvm-svn: 358932
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index e114a87c8e3..5a6d85cd00c 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -430,22 +430,6 @@ bool Decl::isReferenced() const { return false; } -bool Decl::isExported() const { - if (isModulePrivate()) - return false; - // Namespaces are always exported. - if (isa<TranslationUnitDecl>(this) || isa<NamespaceDecl>(this)) - return true; - // Otherwise, this is a strictly lexical check. - for (auto *DC = getLexicalDeclContext(); DC; DC = DC->getLexicalParent()) { - if (cast<Decl>(DC)->isModulePrivate()) - return false; - if (isa<ExportDecl>(DC)) - return true; - } - return false; -} - ExternalSourceSymbolAttr *Decl::getExternalSourceSymbolAttr() const { const Decl *Definition = nullptr; if (auto *ID = dyn_cast<ObjCInterfaceDecl>(this)) { |