summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/bodynotinblock.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/bodynotinblock.hxx')
-rw-r--r--compilerplugins/clang/bodynotinblock.hxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/compilerplugins/clang/bodynotinblock.hxx b/compilerplugins/clang/bodynotinblock.hxx
index dba82a67917e..9846d7a0e567 100644
--- a/compilerplugins/clang/bodynotinblock.hxx
+++ b/compilerplugins/clang/bodynotinblock.hxx
@@ -11,27 +11,23 @@
#ifndef BODYNOTINBLOCK_H
#define BODYNOTINBLOCK_H
-#include <clang/AST/RecursiveASTVisitor.h>
-
-using namespace clang;
+#include "compileplugin.hxx"
namespace loplugin
{
-typedef std::vector< const Stmt* > StmtParents;
-
class BodyNotInBlock
: public RecursiveASTVisitor< BodyNotInBlock >
+ , public Plugin
{
public:
explicit BodyNotInBlock( ASTContext& context );
void run();
bool VisitFunctionDecl( FunctionDecl* declaration );
private:
+ typedef std::vector< const Stmt* > StmtParents;
void traverseStatement( const Stmt* stmt, StmtParents& parents );
void checkBody( const Stmt* body, const StmtParents& parents, int stmtType );
- DiagnosticBuilder report( DiagnosticsEngine::Level level, StringRef message, SourceLocation loc );
- ASTContext& context;
};
} // namespace