diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-19 13:44:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-20 07:49:27 +0200 |
commit | 3b60f59bc55824e247f6e751a9c8f5d253665f0b (patch) | |
tree | 2cf8a2565d50703565f15d03c7ca68de30421822 /compilerplugins/clang/plugin.cxx | |
parent | 42ab759336cd4a4cbcc5be66de33d05b7fc46be4 (diff) |
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>
Diffstat (limited to 'compilerplugins/clang/plugin.cxx')
-rw-r--r-- | compilerplugins/clang/plugin.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx index 3e1111c612ef..ea646d29da89 100644 --- a/compilerplugins/clang/plugin.cxx +++ b/compilerplugins/clang/plugin.cxx @@ -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 ) |