summaryrefslogtreecommitdiffstats
path: root/compilerplugins
Commit message (Collapse)AuthorAgeFilesLines
* weld OrganizeDialogCaolán McNamara2019-06-131-1/+1
| | | | | | | | Change-Id: I976edb0b49c8439d1723be4544b10a5375b8e1d3 Reviewed-on: https://gerrit.libreoffice.org/73900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#114596 compilerplugins: add exception to [loplugin:refcounting]Xisco Fauli2019-05-311-0/+5
| | | | | | | Change-Id: I94a1d4fcacc7907df21b05fd773d3273e1a0d6a2 Reviewed-on: https://gerrit.libreoffice.org/73147 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* fix compilerplugin rebuilding when system clang changesLuboš Luňák2019-05-272-4/+4
| | | | | | | | | | | | | | Since Clang doesn't keep backwards binary compatibility, it's necessary to rebuild when Clang (major version?) changes. This was broken because e.g. check.cxx didn't include plugin.hxx, and so it didn't depend on config_clang.h . Now simply force timestamp change if config_clang.h changes. This still needs re-running configure though. Change-Id: Icbc404b37105599f1ca6c8996f5a3d45d50082db Reviewed-on: https://gerrit.libreoffice.org/72976 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Revert "Remove broken rebuild of compilerplugins when CLANG_FULL_VERSION..."Luboš Luňák2019-05-271-0/+2
| | | | | | | | | | | | | | This reverts commit efe28895498b03f1468a9dc9f510452f36affc2f. It is that commit that is broken. The only thing that does not work is that not all compilerplugin sources depend on config_clang.h, the rest is fine. So instead of reverting something that in principle works (and even complaining in the commit message about the original problem), just fix it (will do in next commit). Change-Id: Ic7766a97220d5b7ef1cd195320899564140fdf1c Reviewed-on: https://gerrit.libreoffice.org/72975 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* sharedvisitor generator should also be rebuilt if clang changesLuboš Luňák2019-05-271-0/+2
| | | | | | | Change-Id: I7602974ed6f4969ec9f79504bdb72758a747d39a Reviewed-on: https://gerrit.libreoffice.org/72982 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* fix clang version checkLuboš Luňák2019-05-271-2/+2
| | | | | | | | | As 56f87dac69b4 says, this is about clang 9, not clang 8. Change-Id: I2978d2235c7eb3ad438082f7b08a1bd68977ed6f Reviewed-on: https://gerrit.libreoffice.org/72974 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Avoid putting generator.dwo in current working dirStephan Bergmann2019-05-231-1/+4
| | | | | | | | | | | | At least some versions of GCC put the -gsplit-dwarf .dwo file in cwd when compiling and linking is done together in one compiler invocation, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90575> "-gsplit-dwarf leaves behind .dwo file in cwd". Change-Id: I1b418e400a3e8107997fbbfd7f87ef3ac9fbbd28 Reviewed-on: https://gerrit.libreoffice.org/72841 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* New loplugin:dataStephan Bergmann2019-05-221-0/+84
| | | | | | | | | | ...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Don't try to evaluate value of value-dependent ExprStephan Bergmann2019-05-222-2/+2
| | | | | | | | | | | ...which causes asserts to fire since <https://github.com/llvm/llvm-project/ commit/04323c24a1ac9464471331d9f6499d3cb95d1ccd> "Added an assertion to constant evaluation enty points that prohibits …" Change-Id: Iafbf1cea85d15a38a71275d4cea8303bab500f6a Reviewed-on: https://gerrit.libreoffice.org/72723 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* use -gsplit-dwarf also for compilerplugins if possibleLuboš Luňák2019-05-201-0/+4
| | | | | | | | | ~350MiB easily saved. Change-Id: I9a91894cf4df7bc06d472795e564148fe8342995 Reviewed-on: https://gerrit.libreoffice.org/72588 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* PPCallback clang plugin should say soLuboš Luňák2019-05-191-0/+4
| | | | | | | Change-Id: I76148f152f57af74935c99e290b30b509511dfd8 Reviewed-on: https://gerrit.libreoffice.org/72546 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Adapt compilerplugins to Clang 9 isExplicitSpecified -> getExplicitSpecifierStephan Bergmann2019-05-162-2/+18
| | | | | | | | | | | see <https://github.com/llvm/llvm-project/commit/ 76b9027f352a83c13c98820724071c5e3bea6232> "[c++20] Add support for explicit(bool), as described in P0892R2." Change-Id: Ia8a6902a64ab3377328fd5e3ed57246d214176f2 Reviewed-on: https://gerrit.libreoffice.org/72335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* an uno -> a unoCaolán McNamara2019-05-102-2/+2
| | | | | | | | Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:unusedmethodsNoel Grandin2019-05-092-229/+405
| | | | | | | Change-Id: I7b4d2e5e611935284e2902b0089950768dfb7717 Reviewed-on: https://gerrit.libreoffice.org/72036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedfieldsNoel Grandin2019-05-094-179/+203
| | | | | | | Change-Id: I8dc5a6ef84f43bad0bee26592b3a8e95c58e6f22 Reviewed-on: https://gerrit.libreoffice.org/72027 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unnecessaryvirtualNoel Grandin2019-05-091-13/+13
| | | | | | | Change-Id: I1fa8248efa16a718f273f20620281737b0da455d Reviewed-on: https://gerrit.libreoffice.org/72024 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:badstaticsNoel Grandin2019-05-071-0/+2
| | | | | | | | | add some more false+ which interestingly enough, only started showing up when I switched on --enable-pch=system Change-Id: I2d52644dc3665db19b28772eb818c138e063dae4
* avoid false warnings from oslendian clang plugin if PCH is usedLuboš Luňák2019-05-051-0/+17
| | | | | | | Change-Id: I3ab8371b14068601995616dc9979a3297313d761 Reviewed-on: https://gerrit.libreoffice.org/71563 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Fix typoAndrea Gelmini2019-05-052-2/+2
| | | | | | | Change-Id: I87fa75d2aab64031426ce0560344908bd81d413c Reviewed-on: https://gerrit.libreoffice.org/71816 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* Fix building compilerplugins with Clang trunk towards Clang 9Stephan Bergmann2019-05-035-0/+16
| | | | | | | | | | | | | | | | ...after <https://github.com/llvm/llvm-project/commit/ f19a8b05171a67a290e7d3bd6eba0c95c7b3259c> "Replace ad-hoc tracking of pattern for an instantiated class-scope" removed ASTContext::getClassScopeSpecializationPattern. None of the affected plugins are enabled by default (nor checked by solenv/CompilerTest_compilerplugins_clang.mk), so just make sure they still compile, leaving any potentially necessary adaptions to another commit. Change-Id: I7102851409e78eff284b50337f7ad0f721e1e548 Reviewed-on: https://gerrit.libreoffice.org/71702 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* revert part of "improve loplugin:stringconstant"Noel Grandin2019-04-302-76/+45
| | | | | | | | | | | | | | | | | | | | | Revert part of commit dd8d5e5795358d732a9f7a8af7c35f662321e332 Date: Mon Apr 29 11:18:21 2019 +0200 improve loplugin:stringconstant sberg's original gerrit comment: but there can also be other problematic overloads for parameters like `void const *` or `std::string_view`. I'm not sure this change is worth the potential false positives. and continuing IRC discussion: <noelgrandin> I'll revert the compilerplugins/ part <sberg> noelgrandin, my main concern is that /if/ somebody eventually runs into such an overload situation, it's really hard to get the warnings/errors fixed for those people, short of going into the plugin itself Change-Id: I4916ce8943c4319d7ef9084e22d6a0eeb430b15c
* improve loplugin:stringconstantNoel Grandin2019-04-302-45/+76
| | | | | | | | | | to find more places we can elide the OUString() constructor at call sites Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713 Reviewed-on: https://gerrit.libreoffice.org/71514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* implement std::hash for css::uno::Reference and rtl::ReferenceNoel Grandin2019-04-301-2/+0
| | | | | | | | | | | | | | | | The declaration in BarChart.cxx is particularly suspicious, because it was using a < for the KeyEqual template parameter. Been there since: commit b2c3233e5f267b5d244d722a94424a3b224b3314 Date: Thu Dec 21 20:08:33 2017 +0900 chart2: suspend/resume setting rects dirty for 3D shapes comphelper::OInterfaceCompare is no longer necessary Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975 Reviewed-on: https://gerrit.libreoffice.org/71537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Fix typoAndrea Gelmini2019-04-291-14/+14
| | | | | | | Change-Id: I6e04287504cc8d4c0e3d09632ee1c7355157e5ee Reviewed-on: https://gerrit.libreoffice.org/71500 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-281-1/+1
| | | | | | | Change-Id: Id6985abca7702039168381082da4e47603b9aaf3 Reviewed-on: https://gerrit.libreoffice.org/71451 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-281-1/+1
| | | | | | | Change-Id: I8c928576919c9410eda0a7f33b2120d13c3bc6bf Reviewed-on: https://gerrit.libreoffice.org/71450 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* There is no ImplSVMainHook()Tor Lillqvist2019-04-262-6/+0
| | | | | | | Change-Id: Ief2636425712f60cfc6e8f68ee0d3fb01608d8ba Reviewed-on: https://gerrit.libreoffice.org/71317 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
* Fix typoAndrea Gelmini2019-04-261-1/+1
| | | | | | | Change-Id: Ie687feebfccf27c366922acfc29ff12cdfa325ba Reviewed-on: https://gerrit.libreoffice.org/71338 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* tdf#89522 PERF FILEOPEN xlsx, part 1Noel Grandin2019-04-242-0/+144
| | | | | | | | | | | | | | | Inherit from tools::WeakBase non-virtually, so that we can use a static_cast in tools::WeakReference::get instead of a dynamic_cast. This takes the file-open time from 1m21 to 40s for me. Add a clang plugin to make sure we don't accidentally end up inheriting from tools::WeakBase more than once. Change-Id: I9c7c36403333f99094e1f9d8cce2ecd9200377f9 Reviewed-on: https://gerrit.libreoffice.org/71231 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Fix typoAndrea Gelmini2019-04-211-1/+1
| | | | | | | Change-Id: I7b94fdd366fd8e149ec6e2af458338e6a56b400c Reviewed-on: https://gerrit.libreoffice.org/71027 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-211-1/+1
| | | | | | | Change-Id: Iaaea14851bb935e4ddfc4e6573356a2314ecd866 Reviewed-on: https://gerrit.libreoffice.org/71029 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* Fix typoAndrea Gelmini2019-04-191-1/+1
| | | | | | | Change-Id: I925942a89d7f01c008788aeada8009a37564b02f Reviewed-on: https://gerrit.libreoffice.org/70971 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* optimise find/insert patternNoel Grandin2019-04-192-6/+3
| | | | | | | | | | if we're doing a find/insert on a set or a map, it is better to just do a conditional insert/emplace operation than triggering two lookups. Change-Id: I80da5097f5a89fe30fa348ce5b6e747c34287a8d Reviewed-on: https://gerrit.libreoffice.org/70937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Removed spurious charsAndrea Gelmini2019-04-181-9/+4
| | | | | | | | | Same thing as in commit e5efd197ad403619ac274c88e2e3be648886aa3d Change-Id: I84faa989387cefef18aa25fa813890d04858f7f2 Reviewed-on: https://gerrit.libreoffice.org/68987 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* New loplugin:selfinitStephan Bergmann2019-04-172-0/+121
| | | | | | | | | | | | | | | | | | | ...to find more bugs like the one addressed in 6340daac7b99c65249363a4bb61c492de31ef5d6 "Revert broken loplugin:sequentialassign change". What it does is: "Warn when a variable is referenced from its own initializer. This is not invalid in general (see C++17 [basic.life]), but is at least suspicious." It found one false positive (addressed with 884ad0d1af88f9985d30ef0dfe92d89e82f8e576 "Split localProcessFactory function into class with setter and getter") and five true positives (addressed with e0ccbe72ed6eb0d309ed272a78fd67a512acff5d "Fix use of variable before its lifetime begins" and 0e335af4d3f044511551fa2ede20911beaee9b41 "Fix uses of variables before their lifetimes begin"). Change-Id: I4c45cceaa042e93b37ad24a54784c027f6ca1f87 Reviewed-on: https://gerrit.libreoffice.org/70897 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* improve loplugin simplifyconstructNoel Grandin2019-04-153-0/+73
| | | | | | | | | | to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedfieldsNoel Grandin2019-04-124-349/+395
| | | | | | | Change-Id: I321c8eefdc43979ef5fd3774c7094ac0dbcac417 Reviewed-on: https://gerrit.libreoffice.org/70657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* -Werror=unused-paramNoel Grandin2019-04-121-4/+3
| | | | Change-Id: I066b74763e45c785a9ebd7094fc33f44b8ddefb6
* remove leftover debug dump() callsNoel Grandin2019-04-121-2/+0
| | | | Change-Id: Ic3c854c831b5b9507e2f1a691adf6a2269b3875b
* loplugin:unnecessaryvirtualNoel Grandin2019-04-121-8/+12
| | | | | | | Change-Id: Ic63efdb720c29bede43e39ee498f63fe1f17fb07 Reviewed-on: https://gerrit.libreoffice.org/70647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin sequentialassignNoel Grandin2019-04-112-0/+426
| | | | | | | | | | Look for places we are assigning to the same variable twice in succession, which means we can simplify that to a single assign Change-Id: I499d20e28f5595e81e927bef8e1bf364eea8ba91 Reviewed-on: https://gerrit.libreoffice.org/70531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Disable LO_CLANG_SHARED_PLUGINS on Windows for nowStephan Bergmann2019-03-271-0/+4
| | | | | | | | | ...needs some more modifications to make it work with clang-cl Change-Id: I6e2f8c9651b0532e21ec5acf94e8bae0a0f8f06e Reviewed-on: https://gerrit.libreoffice.org/69808 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Adapt to Windows sal_uIntPtr/sal_uLong typedefsStephan Bergmann2019-03-271-4/+4
| | | | | | | Change-Id: Ic6f269f75e2b64e0c2a53455e9ee4ccf9891cfb0 Reviewed-on: https://gerrit.libreoffice.org/69807 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:typedefparam (clang-cl)Stephan Bergmann2019-03-271-0/+14
| | | | | | | Change-Id: I07604028845c49cc084927e21db7f21c5d053bab Reviewed-on: https://gerrit.libreoffice.org/69796 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Adpat loplugin:typedefparam to AttributedTypeStephan Bergmann2019-03-271-0/+7
| | | | | | | | | | ...as seen by clang-cl when there are function parameters of function pointer type involving SAL_CALL Change-Id: Ie35f00d4e15ca777b14dd5968cdbd97e43bca1a1 Reviewed-on: https://gerrit.libreoffice.org/69789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Improve loplugin:typedefparam error reportingStephan Bergmann2019-03-272-9/+8
| | | | | | | Change-Id: I2ed4c20ab909b79fca794fb04259018fbfcb1db5 Reviewed-on: https://gerrit.libreoffice.org/69787 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:unnnecessaryvirtualNoel Grandin2019-03-262-11/+13
| | | | | | | Change-Id: I2aa9a8f14b6db2098931a14c6eed522a9d2653ed Reviewed-on: https://gerrit.libreoffice.org/69682 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedfieldsNoel Grandin2019-03-264-109/+75
| | | | | | | Change-Id: I31c953c8e4c1d4ec235ea318d0aa3b7cedaed1a3 Reviewed-on: https://gerrit.libreoffice.org/69683 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:singlevalfieldsNoel Grandin2019-03-262-48/+39
| | | | | | | Change-Id: I4a56a27ebce927b8e21cf37bb2c527caf1317bcc Reviewed-on: https://gerrit.libreoffice.org/69681 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove debugging leftoverNoel Grandin2019-03-251-2/+0
| | | | Change-Id: I656d769f8cfd332172b2a73e9d8eb8a911eac2f8