From: Leonard Chan Date: Tue, 16 Apr 2019 22:59:39 +0000 (+0000) Subject: [NFC] Remove unused function (Sema::pushExternalDeclIntoScope) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ee5a19b2cd93e000c891e3c18edf2b20428a1d2;p=clang [NFC] Remove unused function (Sema::pushExternalDeclIntoScope) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358538 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index b09a4eb93d..351b6aabb1 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -2487,14 +2487,6 @@ public: /// Add this decl to the scope shadowed decl chains. void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext = true); - /// Make the given externally-produced declaration visible at the - /// top level scope. - /// - /// \param D The externally-produced declaration to push. - /// - /// \param Name The name of the externally-produced declaration. - void pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name); - /// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true /// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns /// true if 'D' belongs to the given declaration context. diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index cb1a5b684a..fbe258bb1d 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1404,11 +1404,6 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { } } -void Sema::pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name) { - if (IdResolver.tryAddTopLevelDecl(D, Name) && TUScope) - TUScope->AddDecl(D); -} - bool Sema::isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S, bool AllowInlineNamespace) { return IdResolver.isDeclInScope(D, Ctx, S, AllowInlineNamespace);