new loplugin:shouldreturnbool

Desktop / LibreOffice - Noel Grandin [collabora.co.uk] - 11 June 2018 09:38 EDT

look for methods returning only 1 and/or 0, which (most of the time) should be returning bool.

Off by default, because some of this is a matter of taste

Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379

1f08bff31238 new loplugin:shouldreturnbool
chart2/source/view/main/OpenGLRender.cxx | 37 ++-
chart2/source/view/main/OpenGLRender.hxx | 22 +-
compilerplugins/clang/shouldreturnbool.cxx | 250 +++++++++++++++++++++
compilerplugins/clang/test/shouldreturnbool.cxx | 31 +++
cui/source/customize/macropg.cxx | 8 +-
cui/source/inc/macropg.hxx | 2 +-
editeng/source/editeng/impedit.hxx | 2 +-
editeng/source/editeng/impedit4.cxx | 4 +-
editeng/source/outliner/outlvw.cxx | 3 +-
filter/source/xsltfilter/LibXSLTTransformer.cxx | 6 +-
filter/source/xsltfilter/LibXSLTTransformer.hxx | 2 +-
forms/source/richtext/richtextimplcontrol.cxx | 6 +-
forms/source/richtext/richtextimplcontrol.hxx | 2 +-
fpicker/source/office/iodlg.cxx | 10 +-
fpicker/source/office/iodlg.hxx | 2 +-
.../source/layoutmanager/toolbarlayoutmanager.cxx | 4 +-
.../source/layoutmanager/toolbarlayoutmanager.hxx | 2 +-
hwpfilter/source/solver.cxx | 14 +-
hwpfilter/source/solver.h | 2 +-
include/editeng/outliner.hxx | 3 +-
sal/rtl/alloc_arena.cxx | 10 +-
sc/source/core/opencl/formulagroupcl.cxx | 4 +-
solenv/CompilerTest_compilerplugins_clang.mk | 1 +
store/source/storbios.cxx | 3 +-
store/source/storbios.hxx | 2 +-
sw/inc/editsh.hxx | 2 +-
sw/inc/view.hxx | 16 +-
sw/source/core/edit/editsh.cxx | 3 +-
sw/source/uibase/dochdl/gloshdl.cxx | 4 +-
sw/source/uibase/dochdl/swdtflvr.cxx | 6 +-
sw/source/uibase/inc/langhelper.hxx | 2 +-
sw/source/uibase/inc/swdtflvr.hxx | 2 +-
sw/source/uibase/inc/wrtsh.hxx | 2 +-
sw/source/uibase/shells/drwtxtex.cxx | 3 +-
sw/source/uibase/shells/langhelper.cxx | 3 +-
sw/source/uibase/shells/txtcrsr.cxx | 3 +-
sw/source/uibase/uiview/viewmdi.cxx | 12 +-
sw/source/uibase/uiview/viewport.cxx | 18 +-
sw/source/uibase/wrtsh/select.cxx | 3 +-
vcl/inc/salobj.hxx | 2 +
vcl/inc/salwtype.hxx | 2 -
vcl/inc/unx/i18n_ic.hxx | 2 +-
vcl/source/window/syschild.cxx | 4 +-
vcl/unx/generic/app/i18n_ic.cxx | 6 +-
44 files changed, 390 insertions(+), 137 deletions(-)

Upstream: cgit.freedesktop.org


  • Share