summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unusedvariablecheck.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-03-21 16:42:10 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-03-28 18:01:00 +0100
commit153a69cad2efdb38f7da50bcd25158d127a944f4 (patch)
tree3ae6a544f73bd0821b47d0763f45a7f62812c35a /compilerplugins/clang/unusedvariablecheck.cxx
parent9ab15ecc4f162cd6d8ce305f0d7ac064c1e1704c (diff)
pass around CompilerInstance rather than ASTContext
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
Diffstat (limited to 'compilerplugins/clang/unusedvariablecheck.cxx')
-rw-r--r--compilerplugins/clang/unusedvariablecheck.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/unusedvariablecheck.cxx b/compilerplugins/clang/unusedvariablecheck.cxx
index 989269f59e7f..c0bf8be522c3 100644
--- a/compilerplugins/clang/unusedvariablecheck.cxx
+++ b/compilerplugins/clang/unusedvariablecheck.cxx
@@ -30,14 +30,14 @@ SAL_WARN_UNUSED (see e.g. OUString). For external classes such as std::vector
that cannot be edited there is a manual list below.
*/
-UnusedVariableCheck::UnusedVariableCheck( ASTContext& context )
- : Plugin( context )
+UnusedVariableCheck::UnusedVariableCheck( CompilerInstance& compiler )
+ : Plugin( compiler )
{
}
void UnusedVariableCheck::run()
{
- TraverseDecl( context.getTranslationUnitDecl());
+ TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
}
bool UnusedVariableCheck::VisitVarDecl( VarDecl* var )