loplugin:unusedfields fix false positive

Desktop / LibreOffice - Noel Grandin [collabora.co.uk] - 20 June 2017 01:49 EDT

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

3b60f59 loplugin:unusedfields fix false positive
compilerplugins/clang/plugin.cxx | 5 ++
compilerplugins/clang/plugin.hxx | 2 +
compilerplugins/clang/pluginhandler.cxx | 16 +++++--
compilerplugins/clang/pluginhandler.hxx | 2 +-
compilerplugins/clang/test/unusedfields.cxx | 28 +++++++++++
compilerplugins/clang/unusedfields.cxx | 70 +++++++++++++++++++++-------
solenv/CompilerTest_compilerplugins_clang.mk | 1 +
7 files changed, 102 insertions(+), 22 deletions(-)

Upstream: cgit.freedesktop.org


  • Share