summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/plugin.cxx18
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();