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-09 09:27:25 -05:00
|
|
|
#include "compileplugin.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:
|
|
|
|
explicit UnusedVariableCheck( ASTContext& context );
|
|
|
|
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
|