cURL: follow redirects
[LibreOffice.git] / compilerplugins / clang / store / tutorial / tutorial3.hxx
blob4261d1bfd7f07000cc92677342464ce1bc283ba1
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 TUTORIAL3_H
13 #define TUTORIAL3_H
15 #include "plugin.hxx"
17 namespace loplugin
20 // Similar like for Tutorial2, but this time the base class is RewritePlugin.
21 class Tutorial3
22 : public RecursiveASTVisitor< Tutorial3 >
23 , public RewritePlugin
25 public:
26 // One more argument for ctor.
27 Tutorial3( const InstantiationData& data );
28 virtual void run() override;
29 // Will be called for every if statement.
30 bool VisitIfStmt( const IfStmt* ifstmt );
31 private:
32 // Helper function to check if the statement is 'return false;' and
33 // modify it if yes.
34 void modifyReturnFalse( const Stmt* stmt );
37 } // namespace
39 #endif // POSTFIXINCREMENTFIX_H
41 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */