loplugin:unusedfields fix false positive

When the field in question is read from inside a constructor
initializer.

In the process, create some needed infrastructure in the plugin classes.

Change-Id: I2f440efa6912801a236727c9fe3180404616958c
Reviewed-on: https://gerrit.libreoffice.org/38960
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2017-06-19 13:44:14 +02:00
parent 42ab759336
commit 3b60f59bc5
7 changed files with 102 additions and 22 deletions

View File

@@ -265,6 +265,11 @@ SourceLocation Plugin::locationAfterToken( SourceLocation location )
return Lexer::getLocForEndOfToken( location, 0, compiler.getSourceManager(), compiler.getLangOpts());
}
bool Plugin::isUnitTestMode()
{
return PluginHandler::isUnitTestMode();
}
RewritePlugin::RewritePlugin( const InstantiationData& data )
: Plugin( data )
, rewriter( data.rewriter )