new loplugin:constfields

Desktop / LibreOffice - Noel Grandin [collabora.co.uk] - 13 September 2018 06:30 EDT

look for fields which are only assigned to in the constructor, so they can be made const

Change-Id: I0b76817c2181227b04f6a29d6a808f5e31999765 Reviewed-on: https://gerrit.libreoffice.org/60393

8c29b0837d92 new loplugin:constfields
compilerplugins/clang/constfields.cxx | 593 +++++++++++++++++++++++++++
compilerplugins/clang/constfields.py | 95 +++++
compilerplugins/clang/constfieldsrewrite.cxx | 143 +++++++
compilerplugins/clang/test/constfields.cxx | 45 ++
compilerplugins/clang/unusedfields.cxx | 28 --
compilerplugins/clang/unusedfields.py | 32 --
solenv/CompilerTest_compilerplugins_clang.mk | 1 +
7 files changed, 877 insertions(+), 60 deletions(-)

Upstream: cgit.freedesktop.org


  • Share