loplugin:stringadd look for unnecessary temporaries

Desktop / LibreOffice - Noel Grandin [collabora.co.uk] - 14 October 2019 06:26 EDT

which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors.

Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724

9b5dad13b56b loplugin:stringadd look for unnecessary temporaries
chart2/qa/extras/chart2dump/chart2dump.cxx | 4 +-
codemaker/source/cppumaker/cppuoptions.cxx | 20 ++---
codemaker/source/javamaker/javaoptions.cxx | 14 ++--
comphelper/source/misc/storagehelper.cxx | 2 +-
compilerplugins/clang/stringadd.cxx | 89 +++++++++++++++++++---
compilerplugins/clang/test/stringadd.cxx | 44 ++++++++++-
connectivity/source/drivers/firebird/Util.cxx | 2 +-
cppu/source/uno/EnvStack.cxx | 2 +-
cppu/source/uno/lbenv.cxx | 2 +-
cppuhelper/source/implbase_ex.cxx | 2 +-
cui/source/dialogs/FontFeaturesDialog.cxx | 3 +-
cui/source/dialogs/about.cxx | 2 +-
editeng/source/items/borderline.cxx | 2 +-
editeng/source/items/frmitems.cxx | 20 ++---
editeng/source/items/itemtype.cxx | 4 +-
editeng/source/items/textitem.cxx | 2 +-
filter/source/msfilter/rtfutil.cxx | 2 +-
.../source/breakiterator/breakiterator_unicode.cxx | 2 +-
i18npool/source/localedata/localedata.cxx | 2 +-
idlc/inc/astsequence.hxx | 2 +-
include/oox/export/utils.hxx | 2 +-
include/rtl/stringconcat.hxx | 12 ++-
jvmfwk/source/fwkbase.cxx | 18 ++---
l10ntools/source/po.cxx | 8 +-
l10ntools/source/pocheck.cxx | 20 ++---
oox/source/export/drawingml.cxx | 8 +-
opencl/source/openclwrapper.cxx | 2 +-
package/qa/cppunit/test_package.cxx | 4 +-
sal/osl/unx/file_misc.cxx | 2 +-
sal/qa/osl/file/osl_File.cxx | 8 +-
sal/rtl/uri.cxx | 2 +-
sc/qa/unit/helper/shared_test_impl.hxx | 2 +-
sc/qa/unit/subsequent_export-test.cxx | 6 +-
sc/qa/unit/ucalc.cxx | 2 +-
sc/qa/unit/ucalc_formula.cxx | 6 +-
sc/source/filter/ftools/ftools.cxx | 8 +-
sc/source/filter/html/htmlexp.cxx | 2 +-
sc/source/filter/lotus/lotform.cxx | 2 +-
sc/source/ui/dbgui/scuiasciiopt.cxx | 2 +-
sc/source/ui/miscdlgs/acredlin.cxx | 2 +-
sc/source/ui/navipi/content.cxx | 6 +-
sc/source/ui/view/tabview5.cxx | 2 +-
sd/qa/unit/export-tests.cxx | 8 +-
sd/source/filter/ppt/pptin.cxx | 2 +-
sd/source/ui/dlg/copydlg.cxx | 16 ++--
sfx2/source/control/msg.cxx | 2 +-
sfx2/source/statbar/stbitem.cxx | 2 +-
sfx2/source/view/lokhelper.cxx | 6 +-
shell/source/unix/exec/shellexec.cxx | 2 +-
stoc/source/corereflection/criface.cxx | 4 +-
svl/qa/unit/svl.cxx | 8 +-
svtools/source/dialogs/addresstemplate.cxx | 4 +-
svx/source/svdraw/svdmrkv.cxx | 2 +-
sw/qa/extras/globalfilter/globalfilter.cxx | 30 ++++----
sw/qa/extras/inc/swmodeltestbase.hxx | 4 +-
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 2 +-
sw/qa/extras/uiwriter/uiwriter2.cxx | 4 +-
sw/qa/extras/ww8export/ww8export2.cxx | 2 +-
sw/source/core/fields/docufld.cxx | 2 +-
sw/source/core/fields/reffld.cxx | 2 +-
sw/source/filter/html/css1atr.cxx | 8 +-
sw/source/filter/html/htmlatr.cxx | 6 +-
sw/source/filter/html/htmlfld.cxx | 3 +-
sw/source/filter/html/htmlforw.cxx | 16 ++--
sw/source/filter/html/htmlnumwriter.cxx | 2 +-
sw/source/filter/html/wrthtml.cxx | 2 +-
sw/source/filter/ww8/docxattributeoutput.cxx | 2 +-
sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +-
sw/source/filter/ww8/wrtw8nds.cxx | 4 +-
sw/source/filter/ww8/ww8atr.cxx | 2 +-
sw/source/filter/ww8/ww8scan.cxx | 2 +-
sw/source/ui/index/cnttab.cxx | 2 +-
sw/source/uibase/app/docstyle.cxx | 2 +-
sw/source/uibase/misc/redlndlg.cxx | 2 +-
test/source/sheet/xsheetauditing.cxx | 3 +-
test/source/xmltesttools.cxx | 26 +++----
ucb/source/ucp/ftp/ftpurl.cxx | 4 +-
unotools/source/i18n/resmgr.cxx | 2 +-
vcl/source/font/OpenTypeFeatureDefinitonList.cxx | 2 +-
vcl/source/window/builder.cxx | 2 +-
vcl/unx/generic/fontmanager/fontconfig.cxx | 2 +-
vcl/unx/generic/fontmanager/helper.cxx | 2 +-
vcl/unx/generic/print/glyphset.cxx | 5 +-
xmloff/source/core/xmlexp.cxx | 3 +-
xmloff/source/style/prstylecond.cxx | 5 +-
.../xmlsec/xmldocumentwrapper_xmlsecimpl.cxx | 2 +-
86 files changed, 338 insertions(+), 225 deletions(-)

Upstream: cgit.freedesktop.org


  • Share