From 5c09f8d6c1f4579c2eec0ccfb7e60921bb297a52 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Tue, 16 Apr 2019 22:59:39 +0000 Subject: [PATCH] [NFC] Remove unused function (Sema::pushExternalDeclIntoScope) llvm-svn: 358538 --- clang/include/clang/Sema/Sema.h | 8 -------- clang/lib/Sema/SemaDecl.cpp | 5 ----- 2 files changed, 13 deletions(-) diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index b09a4eb..351b6aa 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/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/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index cb1a5b6..fbe258b 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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); -- 2.7.4