summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2021-03-08loplugin:refcounting check for one more caseNoel2-5/+89
where we might be holding something newly created by pointer instead of by *::Reference Change-Id: Ife6f7acae4252bf56dcdeb95d72e43c523444f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-07loplugin:staticdynamic now with extra saltNoel2-9/+27
because it wasn't quite there yet - now checks for casts with and without const, because const doesn't really matter here. Change-Id: I319025b2095a803fcaad2a7a696d2730b7fd2f81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-06loplugin:staticdynamic look for static after dynamicNoel2-13/+59
Change-Id: Ic3066d9a9441e369370cc6aa0fbffb9a321bc928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-05loplugin:refcounting return objects properlyNoel2-0/+41
check that when we return ref-counted objects, we do so using rtl::Reference, so that the object actually has a non-zero ref count. Change-Id: Ib3ffae0d2502f6d117550c82fde5449729c27324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111487 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-03vcl/floatwin.hxx can be toolkit only nowCaolán McNamara2-2/+2
Change-Id: Ifd8f58771ea6f9212a0dca7d4550c86ebecd9333 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111814 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-01new loplugin:staticdynamicNoel3-0/+149
look for places we are dynamic_cast'ing after static_cast'ing, which means the dynamic_cast is a waste of time. Change-Id: Ife11bb675020738040646230bbd038278d84f7f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111631 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-27loplugin:unusedfieldsNoel3-28/+14
Change-Id: Ie82cfbc8294ffb6b07e66f6cf15fd326bd551d91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111625 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-27loplugin:unnecessaryvirtualNoel1-13/+9
Change-Id: I99f5302ec5727aae3fad6767b9b477d37beb573b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:unusedmethodsNoel1-159/+157
Change-Id: Ie0534244cc7a30ad006e65baf125c59757c90d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:constantparamNoel5-1393/+1297
Change-Id: Ieaee9a3e3ef4aa9bc390ddb198ee1718f635bcbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:unnecessaryvirtualNoel1-9/+21
Change-Id: I792a717306c232cf200940f9e3944f91885e426a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111387 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:unusedfieldsNoel5-147/+170
Change-Id: Ieb1b890040964e755de5bdf5f8576d4d3bd8a407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23loplugin:refcounting check for managing OWeakObject with raw pointerNoel2-2/+63
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22Avoid loplugin:refounting in uninstantiated template codeStephan Bergmann2-0/+18
...causing e.g. false positive > In file included from shell/source/win32/spsupp/COMOpenDocuments_x64.cxx:11: > In file included from shell/source/win32/spsupp/COMOpenDocuments.cxx:16: > In file included from shell/inc/spsupp\COMOpenDocuments.hpp:21: > shell/inc/spsupp/COMRefCounted.hpp(35,13): error: cppu::OWeakObject subclass 'COMRefCounted<Interfaces...>' being deleted via delete, should be managed via rtl::Reference [loplugin:refcounting] > delete this; > ^~~~~~~~~~~ with clang-cl on Windows. (Ideally, this would be made up for with setting this plugins' shouldVisitTemplateInstantiations() to true, see the TODO added in compilerplugins/clang/test/refcounting.cxx, but that would cause lots of other findings, so is left out for now.) Change-Id: Ia52b13498a0c7169b37ecf4882ce84c3cc1d2cc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111339 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-19compilerplugins: fix referencecasting for clang 7.0.1Miklos Vajna1-2/+2
The error was: error: 'error' diagnostics seen but not expected: File /libreoffice/master-clang/compilerplugins/clang/test/referencecasting.cxx Line 113: unnecessary get() call [loplugin:referencecasting] 1 error generated. I.e. it seems clang7 has the same problem as clang5 that it emits multiple diagnostics for that problematic code line. Adapt the ifdef accordingly. Change-Id: I232ff9a158663e2cb3030e51f655249ff315361e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111196 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-18loplugin:referencecasting add check for new rtl::Reference operatorNoel2-55/+151
rtl::Reference now has a conversion operator to uno::Reference, so look for places where we can simplify the code and use that. Change-Id: Ic81db50d670bed5e875300577d4bf5f3599cc2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18Move GIF writer from filter module into VCLTomaž Vajngerl1-3/+0
Change-Id: I8db3ca0f7953b44791bda47534220902931fab8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111023 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-12loplugin:refcounting check for calling deleteNoel2-0/+33
Change-Id: I5b723d4d2376a28777e3ee7e9706e5f54fcb55e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11loplugin:refcounting generalise type checkingNoel2-68/+112
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-10Fix loplugin:stringliteralvarStephan Bergmann2-2/+13
...detection of OUString( const sal_Unicode * value, sal_Int32 length ) ctor. (On platforms where sal_Int32 is a typedef for int, an argument that already is of type int will not be wrapped in an ImplicitCastExpr to the sal_Int32 typedef.) Change-Id: Ifc5456a62d42c1acad76ea949549dc24bd67201a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110654 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-10loplugin:refcounting also check OWeakObject subclassesNoel2-41/+115
Change-Id: I2d89085a22d7424c6f8f7662307433ce50fc61d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-09loplugin:referencecasting check for Reference::queryNoel2-0/+100
Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)Stephan Bergmann2-4/+0
...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-05Make loplugin:cppunitassetequals diagnostic more informativeStephan Bergmann2-16/+17
...which will come in handy for a later improvement of that plugin Change-Id: I548b9388bee60b381c0a2c820f20f596aa0072f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110453 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-03Clean up SmColorTokenTableEntrydante1-6/+0
Remove useless member SmColorTokenTableEntry::cIdent aColorTokenTableDVIPS renamed (make the loop enter in one line) removed redundant code in visitors (related to color) removed temporal variables on visitors (related to color) removed temporal variables on mthmlexport (related to color) removed redundant code in mathmlexport (related to color) Since SmColorTokenTableEntry is used as pointer remove useless operators Change-Id: Icef831711c95e4f9c23b29a3a3606dd9d6fcf6c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-02Avoid --disable-assert-always-abort loplugin:stringviewparam false positivesStephan Bergmann2-0/+6
...like > l10ntools/source/helper.cxx:19:69: error: replace function parameter of type 'const rtl::OString &' with 'std::string_view' [loplugin:stringviewparam] > const OString& rText, const OString& rUnEscaped, const OString& rEscaped ) > ~~~~~~~~~~~~~~~^~~~~~~~ where the call to rEscaped.getLength(), which would otherwise suppress the warning, is hidden inside an assert. (Similar to aab0322580c87864a4f0c0af1fed07282c8dccbb "Disable loplugin:casttovoid when --disable-assert-always-abort".) Change-Id: Ie054f75317707757b1c6243c593f539d445a9fee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-02loplugin:redundantcast catch more dynamic_castNoel2-7/+35
Change-Id: Ia28e58217cefa306567b53688d851fa210b7821c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-29loplugin:stringviewparam extend to new..Noel2-1/+41
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28add string_view variants of methods to O[U]StringBufferNoel2-3/+92
and update the stringview loplugin to detect cases where we can use these new methods. Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-27Improve loplugin:stringliteralvarStephan Bergmann2-6/+17
...to also consider O[U]String ctors taking pointer and length Change-Id: Iea5041634bfbf5054a1317701e30b56f72e940fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-26Adapt loplugin:stringconstant to many functions taking string_view args nowStephan Bergmann2-0/+11
So look through (implicit) O[U]String to string_view conversions for those arguments. Change-Id: I1101d3f681d227ad0a76a4477bf52a1a3898cfdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-25clang/constfieldsrewrite.cxx: Remove duped linesDr. David Alan Gilbert1-3/+0
Spotted by cppcheck. A duplicated if and comment; looks like a merge screwup ? Change-Id: Iceed88d85d42be601975b7a1daff7a1f002644d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-22improve loplugin:pointerboolNoel2-0/+51
to look through template instantiations involving std::forward motivated by commit b1617acde182d1683bdfb529794d7456f8b4bf6d drop RadioButton arg defaults the nBits arg in builder.cxx was in the wrong place Change-Id: I222ea2aeea6f44ae54839e824a247a8105392c2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-21Use C++20 consteval for the Color(sal_uInt32) ctorStephan Bergmann1-1/+1
...to make it more obvious that, since 63a68064bb33f180b8a231f7524d99405d910226 "make the Color constructors explicitly specify transparency", it should only be called when the argument is known at compile-time to have no transparency/alpha channel. (This revealed a GCC bug causing bogus > xmloff/source/chart/ColorPropertySet.cxx: In constructor ‘xmloff::chart::ColorPropertySet::ColorPropertySet(Color)’: > xmloff/source/chart/ColorPropertySet.cxx:81:9: error: ‘this’ is not a constant expression > 81 | m_nDefaultColor( 0x0099ccff ) // blue 8 > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ so in configure.ac suppress HAVE_CPP_CONSTEVAL when the compiler is found broken.) Change-Id: I68df7bd5fbd9b2dcf2243b5a4bde4064d3d665fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109697 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-20Build compilerplugings code with -fvisibility-inlines-hiddenStephan Bergmann1-1/+1
Even though `llvm-config --cxxflags` does not reflect it, LLVM generally uses -fvisibility-inlines-hidden on Unix-like platforms at least since <https: //github.com/llvm/llvm-project/commit/6b43f1f40f644b896f44078872c0b93ec3afef67> "[CMake] Support -fvisibility-inlines-hidden when LLVM_ENABLE_PIC=Off" debuting in release/3.8.x. At least with my build on macOS 11.1 ARM64 against recent LLVM 12 trunk, that caused a mismatch between > $ nm -m compilerplugins/clang/sharedvisitor/analyzer.o | grep __ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc > 0000000000028038 (__DATA,__data) weak external __ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc and > $ nm -m ~/llvm/inst/lib/libclangAST.a\(JSONNodeDumper.cpp.o\) | grep __ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc > 000000000001ccf0 (__DATA,__data) weak private external __ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc etc., causing (albeit harmless) warnings > [GEN] compilerplugins/clang/sharedvisitor/analyzer > ld: warning: direct access in function 'clang::JSONNodeDumper::VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl const*)' from file '~/llvm/inst/lib/libclangAST.a(JSONNodeDumper.cpp.o)' to global weak symbol 'guard variable for clang::TemplateTemplateParmDecl::getDefaultArgument() const::NoneLoc' from file 'compilerplugins/clang/sharedvisitor/analyzer.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. [...] -fvisibility-inline-hidden is presumably supported by all $(COMPILER_PLUGINS_CXX) used on non-Windows platforms in the wild, so lets be bold and add it unconditionally. Change-Id: I0d405b4f57066baa098977e65e5ba4a3a47575c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109712 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-20Improve loplugin:doubleconvertStephan Bergmann3-12/+25
(The use of isa_and_nonnull<> instead of isa<> is necessary for cases like return (i_styleSettings.*i_getDefaultColor)(); in lcl_getEffectiveColor, svtools/source/table/gridtablerenderer.cxx.) Change-Id: Iffc59b1146dd4ce13bbd3c8a6f46bd3c78a39344 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109663 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-19loplugin:unusedmethodsNoel1-135/+193
GtkPrintWrapper stuff is dead since commit ed07ec7606cb24cccaf6b7b81b2bd308debaa2e6 drop never completed GtkSalPrinter Change-Id: Ia42e9bca020a9683ba247d466f743a0018e920f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-18Mathml gets it's own directorydante2-2/+2
It has grown recently and is going to grow more. cfgitem.hxx has been moved and clangformated because it is not anymore in excludelist Change-Id: I277837b2c0a90ae4e84028dc6e19962939c1aef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16make the Color constructors explicitly specify transparencyNoel1-0/+95
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-14cid#1471346 Uncaught exceptionCaolán McNamara2-2/+5
Change-Id: I535affd6597636aa32e1cf9c6005238f9503ef6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109266 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-12Avoid loplugin:stringviewparam when there already is a string_view overloadStephan Bergmann2-0/+67
This avoids clang-cl > In file included from core/connectivity/source/drivers/ado/Aolevariant.cxx:20: > connectivity/source/inc\ado/Aolevariant.hxx(72,40): error: replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam] > OLEVariant(const OUString& us) > ~~~~~~~~~~~~~~~~^~ which would make that OLEVariant ctor overload redundant with the existing OLEVariant(std::u16string_view us); overload, but with the OUString overload gone, implicit conversions from OUString to OLEVariant would no longer work, e.g., > connectivity/source/drivers/ado/AColumn.cxx(184,76): error: no viable conversion from 'rtl::OUString' to 'const connectivity::ado::OLEVariant' > OTools::putValue(m_aColumn.get_Properties(), sAdoPropertyName, getString(rValue)); > ^~~~~~~~~~~~~~~~~ Change-Id: I92a5cc29d9fd2a5ff1a951f79df64879d0f71743 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109180 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-06loplugin:unusedfieldsNoel4-126/+132
Change-Id: I0599f33ef4c0070e6ce61b0041db074cce217349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann1-0/+8
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-03Bump copyright year to 2021Adolfo Jayme Barrientos1-1/+1
Change-Id: I3159bfc21a35fc80aef57c7d809d8ea8c62a732e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108566 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-2/+3
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-27Simplify loplugin:stringviewparam comparison operator handlingStephan Bergmann1-32/+7
In practice, it works fine to look at all of them, regardless of actual argument types. Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26Cleanups after vcl/bitmapaccess.hxx splittingIlmari Lauhakangas1-1/+1
Change-Id: I5a24fb984ba6fbfc2b316420d5ffa372f35ce061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108318 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-26New loplugin:stringliteralvarStephan Bergmann2-0/+284
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-23Don't call isIntegerConstantExpr on value dependent ExprStephan Bergmann2-2/+5
...as it causes Clang to fail with > Assertion failed: (!isValueDependent() && "Expression evaluator can't be called on a dependent expression."), function isIntegerConstantExpr, file .../llvm/llvm-project/clang/lib/AST/ExprConstant.cpp, line 15487. Change-Id: I335f7610955c30a5c102bfb3b8aa6441a30dd247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-20No longer need to worry about ambiguous operator== in loplugin:stringviewparamStephan Bergmann1-5/+4
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view) constructors explicit" Change-Id: I6e884c762a2fc91f5dd6fbb197a596fd60f17cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>