diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-03-09 11:59:11 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-03-09 14:22:50 +0100 |
commit | cfc2a227b402930c2fe2c3087a0956c7f9a6d485 (patch) | |
tree | 26a046584f535e553867df762aa71b9079c51aa5 /compilerplugins/clang | |
parent | 358991e3b0a49bb201c2f1e4be900ee99aac9aa8 (diff) |
compilerplugins: remove unused getDeclContext()
Change-Id: I523cc2195be5f200b3e416d1ec3b282e3245ebbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90214
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/plugin.cxx | 18 |
1 files changed, 0 insertions, 18 deletions
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(); |