2012-10-09 07:50:19 -05:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* Based on LLVM/Clang.
|
|
|
|
*
|
|
|
|
* This file is distributed under the University of Illinois Open Source
|
|
|
|
* License. See LICENSE.TXT for details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UNUSEDVARIABLECHECK_H
|
|
|
|
#define UNUSEDVARIABLECHECK_H
|
|
|
|
|
2012-10-15 08:36:25 -05:00
|
|
|
#include "plugin.hxx"
|
2012-10-09 07:50:19 -05:00
|
|
|
|
|
|
|
namespace loplugin
|
|
|
|
{
|
|
|
|
|
|
|
|
class UnusedVariableCheck
|
|
|
|
: public RecursiveASTVisitor< UnusedVariableCheck >
|
2012-10-09 09:27:25 -05:00
|
|
|
, public Plugin
|
2012-10-09 07:50:19 -05:00
|
|
|
{
|
|
|
|
public:
|
2013-03-21 10:42:10 -05:00
|
|
|
explicit UnusedVariableCheck( CompilerInstance& compiler );
|
2013-02-02 10:45:18 -06:00
|
|
|
virtual void run();
|
2012-10-13 10:38:58 -05:00
|
|
|
bool VisitVarDecl( VarDecl* var );
|
2012-10-09 07:50:19 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif // UNUSEDVARIABLECHECK_H
|