resurrect and improve loplugin:referencecasting

Desktop / LibreOffice - Noel Grandin [collabora.co.uk] - 23 July 2019 11:51 EDT

Improve the plugin to avoid generating false+ with the special case of querying XInterface (what the code calls normalisation).

Also ignore places where the querying is dealing with ambiguous base classes.

Change-Id: I23b2b2fa6618328fafc4707b94c26582a462ea87 Reviewed-on: https://gerrit.libreoffice.org/74993

c4bce5dafdfc resurrect and improve loplugin:referencecasting
compilerplugins/clang/referencecasting.cxx | 385 +++++++++++++++++++++
compilerplugins/clang/store/referencecasting.cxx | 195 -----------
compilerplugins/clang/store/referencecasting.hxx | 33 --
compilerplugins/clang/test/referencecasting.cxx | 150 ++++++++
solenv/CompilerTest_compilerplugins_clang.mk | 1 +
.../accessibility/accessible_relation_set.cxx | 2 -
sw/qa/extras/globalfilter/globalfilter.cxx | 8 +-
sw/qa/extras/mailmerge/mailmerge.cxx | 8 +-
sw/qa/extras/odfexport/odfexport.cxx | 22 +-
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 45 ++-
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 6 +-
sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 40 +--
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 14 +-
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 18 +-
sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 5 +-
sw/qa/extras/rtfimport/rtfimport.cxx | 61 ++--
sw/qa/extras/uiwriter/uiwriter.cxx | 51 ++-
sw/qa/extras/uiwriter/uiwriter2.cxx | 8 +-
sw/qa/extras/unowriter/unowriter.cxx | 14 +-
sw/qa/extras/ww8export/ww8export.cxx | 48 +--
sw/qa/extras/ww8export/ww8export2.cxx | 88 ++---
sw/qa/extras/ww8export/ww8export3.cxx | 2 +-
22 files changed, 744 insertions(+), 460 deletions(-)

Upstream: cgit.freedesktop.org


  • Share