[Libreoffice-commits] core.git: compilerplugins/clang

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 9 13:23:23 UTC 2020


 compilerplugins/clang/plugin.cxx |   18 ------------------
 1 file changed, 18 deletions(-)

New commits:
commit cfc2a227b402930c2fe2c3087a0956c7f9a6d485
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Mar 9 11:59:11 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Mar 9 14:22:50 2020 +0100

    compilerplugins: remove unused getDeclContext()
    
    Change-Id: I523cc2195be5f200b3e416d1ec3b282e3245ebbb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90214
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index d2555eb034c2..d91acf722f1a 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -199,24 +199,6 @@ Stmt* Plugin::getParentStmt( Stmt* stmt )
     return const_cast<Stmt*>(parentsRange.begin()->get<Stmt>());
 }
 
-static const Decl* getDeclContext(ASTContext& context, const Stmt* stmt)
-{
-    auto it = context.getParents(*stmt).begin();
-
-    if (it == context.getParents(*stmt).end())
-          return nullptr;
-
-    const Decl *aDecl = it->get<Decl>();
-    if (aDecl)
-          return aDecl;
-
-    const Stmt *aStmt = it->get<Stmt>();
-    if (aStmt)
-        return getDeclContext(context, aStmt);
-
-    return nullptr;
-}
-
 static const Decl* getFunctionDeclContext(ASTContext& context, const Stmt* stmt)
 {
     auto it = context.getParents(*stmt).begin();


More information about the Libreoffice-commits mailing list