bump product version to 5.0.4.1
[LibreOffice.git] / compilerplugins / clang / bodynotinblock.hxx
blobe79060b8a073477f80c5caed73f1ed551c4cda4d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * Based on LLVM/Clang.
7 * This file is distributed under the University of Illinois Open Source
8 * License. See LICENSE.TXT for details.
12 #ifndef BODYNOTINBLOCK_H
13 #define BODYNOTINBLOCK_H
15 #include "plugin.hxx"
17 namespace loplugin
20 class BodyNotInBlock
21 : public RecursiveASTVisitor< BodyNotInBlock >
22 , public Plugin
24 public:
25 explicit BodyNotInBlock( const InstantiationData& data );
26 virtual void run() override;
27 bool VisitIfStmt( const IfStmt* stmt );
28 bool VisitWhileStmt( const WhileStmt* stmt );
29 bool VisitForStmt( const ForStmt* stmt );
30 bool VisitCXXForRangeStmt( const CXXForRangeStmt* stmt );
31 private:
32 typedef vector< const Stmt* > StmtParents;
33 void checkBody( const Stmt* body, SourceLocation stmtLocation, int stmtType, bool dontGoUp = false );
36 } // namespace
38 #endif // BODYNOTINBLOCK_H
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */