153a69cad2
It's possible to get the latter from the former, and the former is useful for other things too (access to the preprocessor, for example). Change-Id: I708d709129fd3a35bf7c63da4de09c2e696b382d
31 lines
625 B
C++
31 lines
625 B
C++
/*
|
|
* 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
|
|
|
|
#include "plugin.hxx"
|
|
|
|
namespace loplugin
|
|
{
|
|
|
|
class UnusedVariableCheck
|
|
: public RecursiveASTVisitor< UnusedVariableCheck >
|
|
, public Plugin
|
|
{
|
|
public:
|
|
explicit UnusedVariableCheck( CompilerInstance& compiler );
|
|
virtual void run();
|
|
bool VisitVarDecl( VarDecl* var );
|
|
};
|
|
|
|
} // namespace
|
|
|
|
#endif // UNUSEDVARIABLECHECK_H
|