From cfc2a227b402930c2fe2c3087a0956c7f9a6d485 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 9 Mar 2020 11:59:11 +0100 Subject: compilerplugins: remove unused getDeclContext() Change-Id: I523cc2195be5f200b3e416d1ec3b282e3245ebbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90214 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- compilerplugins/clang/plugin.cxx | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'compilerplugins/clang') 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(parentsRange.begin()->get()); } -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(); - if (aDecl) - return aDecl; - - const Stmt *aStmt = it->get(); - if (aStmt) - return getDeclContext(context, aStmt); - - return nullptr; -} - static const Decl* getFunctionDeclContext(ASTContext& context, const Stmt* stmt) { auto it = context.getParents(*stmt).begin(); -- cgit