summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2022-05-20new loplugin:unnecessary lockingNoel Grandin
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-18Extend loplugin:redundantcast to trivial reinterpret_cast from T to itselfStephan Bergmann
Change-Id: I7c0be7b435d6b5f97bdd40484023584146638d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134506 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-18Replace OFFSET_OF macro with a function templateStephan Bergmann
(in preparation of extending loplugin:redundantcast to more reinterpret_cast scenarios, which would have caused a false positive here). Required a tweak to loplugin:fakebool (as the relevant reinterpret_cast to silence some occurrences is no longer seen "inline" now), and the heuristics of loplugin:unused no longer worked (also because of the now-hidden reinterpret_cast'ing), but adding a maybe_unused attribute looks better than tweaking that plugin's heuristics even further. Change-Id: Iead1a9b31983918cf8f3b0e6c727c0081437c6d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134504 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-05loplugin:unusedvariableplusNoel Grandin
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05Deprecate css::uno::makeAny; completely disable it for LIBO_INTERNAL_ONLYStephan Bergmann
There is just no good reason not to use a css::uno::Any constructor instead, so simplify the code base. For URE backwards compatibility, keep it around as deprecated for !LIBO_INTERNAL_ONLY. Change-Id: I9409d8853cac270d47377a31ba35a1fc23fa9800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133879 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::matchIgnoreAsciiCaseNoel Grandin
Change-Id: Iad8e1ed256d84808404bf20ed7a16b05b3db5818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133753 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-02Just use Any ctor instead of makeAny in writerperfectStephan Bergmann
(which needs one more false loplugin:redundantfcast suppression case) Change-Id: Ib8a72a510384f497bddaef5b812a46ea473481d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133703 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-30new loplugin:stringviewdangleNoel Grandin
to find places where string_view is pointing into a temporary String Change-Id: Ib530b36f441e95d83d8f687d40a97516a0806721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133656 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29Use the false warning suppression mechanism for loplugin:fakeboolStephan Bergmann
Change-Id: I6572e500edc1be845c28389b0a4d3ca258dbbecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133593 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26add o3tl::toUInt32Noel Grandin
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-25Introduce a better mechanism to suppress false loplugin warningsStephan Bergmann
...by annotating occurrences of false warnings with [-loplugin:<name>] comments in source files and letting individual plugins opt-in to watch out for such suppression annotations, rather than maintaining lists of excluded source files in the individual plugins. (See the new loplugin::Plugin::suppressWarningsAt.) Instead of making all calls to loplugin::Plugin::report check for suppression annotations, the intent is that this check will only be added opt-in to those places in the plugins that are prone to emitting false warnings. In general it is better to have plugins that don't produce false warnings in the first place, or at least let those warnings be addressed with trivial and harmless source code modifications, avoiding the need for any suppression mechanism. As a proof of concept, I have removed the exclude list from loplugin:redundantfcast and instead annotated the relevant source code. (And thereby found that three of the six originally excluded files didn't need to be excluded any more at all?) For now, this mechanism looks for comments (both //... and /*...*/, even documentation-style /**...*/) that overlap the current and/or the preceding line, because at least for code controlled by clang-format it is often easier to move comments to a line of their own, preceding the commented code. Looking also at the current line (and not only at the preceding one) opens the door for erroneous over-eager annotation, where an annotation that was meant to address a false warning on the current line would also silence a potentially true warning on the following line. This probably doesn't cause much trouble in practice, but is up for potential change. Change-Id: I91ce7a0e5248886a60b471b1a153867f16bb5cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133365 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-21Fix typoAndrea Gelmini
Change-Id: I0444ed426dddd36e464b59758545155e11e9c13a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133298 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-21tdf#55058 tdf#143875 EMF+ Fix display of dashed lines and line jointsBartosz Kosiorek
With previous implementation, empty spaces between dashes were too long. Additionally line joints were not working correctly, after EMF+ reworking: tdf#111486 This commit fixes all these issues and additionally it is covering it with tests. Change-Id: I9404e566d2d7d3405ab817268ad9b1f538c200eb Change-Id: I523f92a928ab592ff175d0d01c1ad1a3bc22e324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133207 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-04-20loplugin:stringviewvar disable for nowNoel Grandin
since it might generate false + Change-Id: Icde883e0a2d60e70dd4ce9bbf823b54847cbb180 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133203 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19new loplugin:stringviewvar looks for OUString vars that can beNoel Grandin
... that can be string_view Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-17loplugin:stringviewparam convert methods using copy()Noel Grandin
which converts to std::string_view::substr() Change-Id: I3f42213b41a97e77ddcc79d84d512f49d68ca559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-15Adapt to clang::PPCallbacks::InclusionDirective change in Clang 15 trunkStephan Bergmann
<https://github.com/llvm/llvm-project/commit/d79ad2f1dbc2db63121620f55d6cfa915f2733ac> "[clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective()" Change-Id: Ib2ea325cca3be03d3b5dfb9dfc3d870be659b129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133085 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-15Introduce rtl::createUriCharClassStephan Bergmann
...to make those char class array initializations more readable. (Making the corresponding variables constexpr is mostly done so that failures in the provided `unencoded` arguments, like non-ASCII characters or duplicate character typos, would lead to compile-time errors also for !HAVE_CPP_CONSTEVAL. And assigning to a sal_Bool std::array needs another hack to avoid false loplugin:implicitboolconversion warnings.) Change-Id: Ieb8827f69f55f1212a9428817d5331fcb18ef1d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-14Use DeclCheck at one place in loplugin:implicitboolconversionStephan Bergmann
...and add tests for those additions to isBoolExpr done in 8e4d82cd1125502c26ddaaa85c49c4aa44f65811 "loplugin:implicitboolconversion: warn about conversions to unsigned char" (and which were added to avoid false warnings like > testtools/source/bridgetest/bridgetest.cxx:643:21: error: implicit conversion (IntegralToBoolean) of call argument from 'unsigned char' to 'bool' [loplugin:implicitboolconversion] > (xLBT->transportPolyBoolean( > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ and > cui/source/options/optaboutconfig.cxx:359:62: error: implicit conversion (IntegralToBoolean) of call argument from 'unsigned char' to 'bool' [loplugin:implicitboolconversion] > sValue.append(OUString::boolean( seq[j] )); > ^~~~~~ ) Change-Id: I0683144e1c39d31303faf678afaafd708ef7ff79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133018 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12gtk4: add a surface_cell_rendererCaolán McNamara
to bridge our continuing usage of cairo and gtk4 GtkComboBox cell renderers without dropping any existing hidpi wins Change-Id: If5244766c13dd5d82445cb626ef4096e3c6ea244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132926 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08loplugin:stringviewparam convert methods using trimNoel Grandin
for which we add a new o3tl::trim method Change-Id: I9d37b6264eea106aa2f3502bd24b8cccf7850938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-05Simplify GlobalNamespace checkStephan Bergmann
Change-Id: Id70abc5d1ccdc41dc771fe77ad0e7584efe76826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132569 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-04Fix GlobalNamespace checkStephan Bergmann
...so that e.g. building on F36 with -stdlib=libc++ doesn't fail with > i18nutil/source/utility/paper.cxx:311:75: error: NullToPointer ValueDependentIsNotNull ZeroLiteral -> nullptr [loplugin:nullptr] > locale_t loc = newlocale(LC_PAPER_MASK, "", static_cast<locale_t>(0)); > ^ when the locale_t typedef declaration is nested in extern "C" (from /usr/include/stdlib.h) which in turn is nested in extern "C++" (from LLVM's include/c++/v1/math.h) Change-Id: Ie81d7425cda231954bdbab47c3a0431dc7c27f5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132520 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-03loplugin:stringviewparam convert methods using matchNoel Grandin
which converts to a combination of substr and o3tl::starts_with Change-Id: I5b01a181b9e6bee3483e4f49f1a9426abcc682d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132458 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using compareToNoel Grandin
which converts to compare Change-Id: If03c790ea113a7caedbe89f926b29055c9ec1e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using indexOfNoel Grandin
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...which was apparently meant as a "Possible debugger breakpoint" in DBG_UTIL-only sw_DebugRedline. The obvious fix is to mark nDummy as volatile, but increment of a volatile variable is deprecated, so replace those with reads of the variable, but which triggered false loplugin:casttovoid so fix that too. Change-Id: I07376e665caa4fd9befaba06d261a50df7a63a10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132237 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28Drop support for OpenGL denylist on X11Stephan Bergmann
...which appears to have become even less relevant with db89f53c31af997b9bf422b0e784afba8d62a42e "remove OpenGL VCL backend code". And the vcl/unx/glxtest.cxx machinery that it is based on is (a) known to cause issues like <https://gitlab.freedesktop.org/mesa/mesa/-/issues/3957> "LibreOffice's OpenGL version detection code hangs when running inside a flatpak container with a different mesa version", and (b) is one of the two reasons why an soffice that uses Wayland nevertheless also requires Xwayland during startup (the other reason being oosplash). So getting rid of the glxtest machinery is beneficial. The remaining two potential uses of OpenGL on X11/Wayland are the obscure css.rendering.SpriteCanvas.OGL service implementation (about which db89f53c31af997b9bf422b0e784afba8d62a42e states that "it seems has never been finished or enabled (or so it most probably should be dumped too)") and some slideshow transitions. About the latter, Caolán stated on IRC: "I think we grew this set of stuff to check for dodgy opengl primarily for the case where vcl used opengl for ordinary UI optimizations; but I think that use is gone now so I wonder does it make sense to just drop all of that entirely; for just slide transitions we apparently survived fine without the denylist for ages". (And in any case there is still the WatchdogThread support with OpenGLZone::hardDisable in VCLExceptionSignal_impl, vcl/source/app/svmain.cxx, should any OpenGL code run into problems.) (The removal of gb_LinkTarget_use_glxtest from gb_LinkTarget_use_vclmain, which indirectly brought in gb_LinkTarget_use_libraries,*,vcl, revealed that an explicit use of vcl was missing from various Executables etc., which thus had to be added now.) Change-Id: Ifa5220fd09910a4459ca546d9655e479a2e38f1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131943 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28Adapt loplugin:singlevalfields to AtomicExprStephan Bergmann
> AtomicExpr 0xcb01120 'std::__detail::__platform_wait_t':'int' > |-ImplicitCastExpr 0xcb01108 'std::__detail::__platform_wait_t *' <LValueToRValue> > | `-MemberExpr 0xcb01048 'std::__detail::__platform_wait_t *' lvalue ->_M_addr 0xcafd9c8 > | `-CXXThisExpr 0xcb01038 '__waiter_base<_Tp> *' implicit this > |-IntegerLiteral 0xcb01098 'int' 5 > `-IntegerLiteral 0xcb01078 'int' 1 > AtomicExpr 0xd1e2d08 'std::__detail::__platform_wait_t':'int' > |-ImplicitCastExpr 0xd1e2cf0 'std::__detail::__platform_wait_t *' <LValueToRValue> > | `-MemberExpr 0xd1e2cc0 'std::__detail::__platform_wait_t *' lvalue ->_M_addr 0xcb02bf8 > | `-CXXThisExpr 0xd1e2cb0 'struct std::__detail::__waiter_base<struct std::__detail::__waiter_pool> *' implicit this > |-IntegerLiteral 0xcb01098 'int' 5 > `-IntegerLiteral 0xcb01078 'int' 1 > error: 'error' diagnostics seen but not expected: > File ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/atomic_wait.h Line 312: oh dear, what can the matter be? [loplugin:singlevalfields] > File ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/atomic_wait.h Line 312: oh dear, what can the matter be? [loplugin:singlevalfields] Change-Id: I71c43b482aaa0992b7ce131d27e262b8e3b4087f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132160 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-25loplugins ignoreLocation() is unreliable with PCHNoel Grandin
Change-Id: Ic12cacb6e058a8725ea6d722399e3afe6ea458c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-24Adapt loplugin:trivialconsructor to clang-clStephan Bergmann
...where the S4 template constructor may still have an unparsed null body, so if (!constructorDecl->hasTrivialBody()) return true; will suppress the expected warning. Lets just accept that clang-cl on Windows will find less instances of loplugin:trivialconstructor. (And moving the expected-error comment around on the line was demanded by clang-format. Oh my.) Change-Id: I3357fbd0fbf932f7f93c421c2f079a8cfc536eef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132019 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-24loplugin:constantparam improvementsNoel Grandin
(1) sanitize call value output, make downstream processing easier (2) remove bad ignoreLocation() call, which was eliminating a lot of valueable data and thus generating false positives Change-Id: I39230c260c5cf717559300913fbc68bc3485b957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-23loplugin:unusedfieldsNoel Grandin
Change-Id: Ifa2e2b35b725a877ef43526ad243cbfd02148807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-22Adapt loplugin:indentation to --enable-qt6Stephan Bergmann
> In file included from vcl/qt6/QtClipboard.cxx:10: > vcl/qt6/../qt5/QtClipboard.cxx:142:16: error: statement mis-aligned compared to neighbours [loplugin:indentation] > Q_EMIT clearClipboard(); > ^ etc. Change-Id: I8ceacfd5eafe963699d8313d3f8cadbed4ccd260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131929 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-22Win/X11OpenGLDeviceInfo don't need a common base classStephan Bergmann
Change-Id: I9fc7e763b8cf055c3aabaaa97fe8c85ebc5e71b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-16Consistently avoid loplugin:trivialconstructor when there are defaulted paramsStephan Bergmann
(The template default constructor in S8 had already been suppressed via std::distance(recordDecl->ctor_begin(), recordDecl->ctor_end() being zero, but the similar case in S7 caused a warning.) Change-Id: I4d18dec8bb971198eb8503262572a08c019c66bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131663 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-16Fix loplugin:trivialconstructor handling of ctor templatesStephan Bergmann
Change-Id: Ic8b2f26498099c77b834d8e152f06d2834dfee3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131658 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-15Simplify loplugin:trivialdestructorStephan Bergmann
The recursive checking of (non-virtual) bases and the checking of all virtual bases were unnecessary. It suffices to just check whether all the direct (virtual and non-virtual) bases have trivial destructors. (And FieldHasTrivialDestructor*Body* was a misnomer, as it actually checks whether the corresponding type has a trivial destructor.) Change-Id: I8a70e18eea4b629ad56577fa885f51925f9d7dde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131608 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-15loplugin:trivialdestructor: Remove spurious anonymous union special caseStephan Bergmann
No idea what this "The destructor for an implicit anonymous union member is never invoked" block was meant to be good for. If a union-like class X has a variant member Y with a non-trivial destructor, an (implicitly-declared) defaulted destructor of X would be defined as deleted, so we must not warn about a user-provided destructor of X with an empty body. But that is already covered by the fact that the anonymous union of which Y is a member will have a non-trivial destructor if Y has a non-trivial destructor. Change-Id: Ia30381a07fadd3132f5595575716c6c5097fa34d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-15Check that loplugin:trivialdestructor doesn't warn about deleted dtorsStephan Bergmann
...which happens to be covered by if (!destructorDecl->hasTrivialBody()) return false; Change-Id: Ica2874e710da08d668b7e773373a1188a8ae16a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131575 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-15loplugin:trivialdestructor: Only warn about definitionsStephan Bergmann
Change-Id: I666e72a5c95b48cd5bc0cb775de3ec6a6c82fe39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131574 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-14new loplugin:trivialconstructorNoel Grandin
Change-Id: Iaaf63c49ce94987ab9c4ebc68e963cc3054a3c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-11load ods/xlsx with full row attributes without allocating all columnsLuboš Luňák
If there's e.g. an entire row bold, it's enough to set default attribute for unallocated columns. This also reverts the workaround from commit 297ab561c6754, as it's no longer necessary. Change-Id: I0b208709aeaff1c0d59da2410926876715cfe642 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131320 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-11new loplugin:trivialdestructorNoel Grandin
look for potentially trivial destructors that can then be elided Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-25Don't use Library_tl in URE librariesStephan Bergmann
This partly reverts 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 "log nice exception messages whereever possible", e1eb7cb04a4c30cec238ab0f54d41a6cdc3299c1 "loplugin:logexceptionnicely in starmath..svgio", d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5 "OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTION", and 877f40ac3f2add2b6dc37bae280d4d98dd102286 "tdf#42949 Fix new IWYU warnings in directories [h-r]*", and adapts loplugin:logexceptionnicely accordingly. Change-Id: I792b853b988c7c5f77179ca0672c30cb4223b5a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>