summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2021-05-26tdf#142467 crash on calling 'getInfoHelper' in final classCaolán McNamara1-0/+2
IPropertyArrayHelper & rInfo = getInfoHelper(); crashes when CandleStickChartType is final for unknown reasons. I see this with gcc-11.1.1-1.fc34.x86_64 in 7-1 locally but also in the fedora libreoffice-7.0.6 built with gcc-10 so this isn't a recent problem. #1 0x00007ffff6f4fe91 in cppu::OPropertySetHelper::getFastPropertyValue(int) (this=this@entry=0x5bdd588, nHandle=nHandle@entry=3) at cppuhelper/source/propshlp.cxx:549 #2 0x00007fffad45e9ff in chart::CandleStickChartType::getSupportedMandatoryRoles() (this=0x5bdd520) at chart2/source/model/template/CandleStickChartType.cxx:219 Change-Id: Ia029162587da1fc00df32866863deb186c7e11bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116153 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-10Bump 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> (cherry picked from commit 1f1f68d6e8a32d8884e8de322e32c588a87964db) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108581 Tested-by: Jenkins Reviewed-by: Martin Srebotnjak <miles@filmsi.net>
2020-11-24tdf#138194 Chart OOXML import: set text break to trueTünde Tóth1-4/+0
of rotated category axis label, if the rotation is 90 or 270 degree and the inner size of the chart is not fixed. Change-Id: I02e1fd940af8a277435aa46d4ad93a42b6723710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106422 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 21620f9d2f50e66dffc45a5afb539edb8d54434c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106446 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-22tdf#123936 Formatting files in module compilerplugins with clang-formatPhilipp Hofer8-78/+72
Change-Id: Ie6e23d3d2a20849e47d048b439d72fd7376c53db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105654 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-19Simplify loplugin:stringviewStephan Bergmann1-96/+44
(It is conversions from certain string expressions, like empty strings or copy calls, to string view we are interested in, wherever they happen to occur. Though this didn't find any additional occurrences to flag now.) Change-Id: I35e544a93f861a9ab9ce6d929f9757cb64ca71c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106118 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-11-19loplugin:stringview: Flag empty string converted to string viewStephan Bergmann2-0/+42
Change-Id: Idf412dc5f235230512160cb4fb7e1a00baa1cfa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106085 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18loplugin:stringviewparam: No good reason to exclude operator functionsStephan Bergmann1-4/+0
(at least not in general) Change-Id: I71337b53dc9735e90a37ee532d0a8a08797b518c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17loplugin:stringviewparam extend to constructorsNoel1-1/+41
Change-Id: Ia573921566ec6079b843cbcc0401d9d0f5c62089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17loplugin:stringviewparam check methods tooNoel1-0/+53
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16Adapt to Clang 12 trunk cosmetic diagnostics changesStephan Bergmann2-7/+7
<https://github.com/llvm/llvm-project/commit/ e7f3e2103cdb567dda4fd52f81bf4bc07179f5a8> "Suppress printing template arguments that match default template arguments of types by default" caused > error: 'error' diagnostics seen but not expected: > File /home/sbergman/lo/core/compilerplugins/clang/test/makeshared.cxx Line 58: rather use make_shared than constructing from 'typename std::remove_reference<unique_ptr<int> &>::type' (aka 'std::unique_ptr<int>') [loplugin:makeshared] > File /home/sbergman/lo/core/compilerplugins/clang/test/makeshared.cxx Line 60: rather use make_shared than constructing from 'typename std::remove_reference<unique_ptr<int> &>::type' (aka 'std::unique_ptr<int>') [loplugin:makeshared] in compilerplugins/clang/test/makeshared.cxx, and <https://github.com/llvm/ llvm-project/commit/5f12f4ff9078455cad9d4806da01f570553a5bf9> "Suppress printing of inline namespace names in diagnostics by default, except where they are necessary to disambiguate the target" caused > error: 'note' diagnostics seen but not expected: > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 133: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 140: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 144: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 167: a function associating 'N::E' is declared here [loplugin:external] > File /home/sbergman/lo/core/compilerplugins/clang/test/external.cxx Line 172: a function associating 'N::E' is declared here [loplugin:external] Change-Id: If1ec798fd9876b5be058c63bcaca3e2a36c0dbb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-15Extend loplugin:stringviewparen: subViewStephan Bergmann1-1/+1
Change-Id: Iee4833b148a5e17e09f84bdfbc8692aa5a956618 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105777 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-13fix some tools::Long falloutNoel Grandin1-0/+2
Change-Id: I8c15b0ee8400c3b540154bc38c51cbf04b6c3850 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105794 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13improve sorting in global-analysis pluginsNoel12-25/+73
Change-Id: I417f6d9fd6981bb402cd216a08db285cc9adeed0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105628 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12loplugin:xmlimportNoel2-2/+51
add check for passing XML_TOK* constants to a non-sal_uInt16 parameter, which is a sign of an incomplete fastparser conversion. Change-Id: Icad5bf9eb40fc15fd07b0d9ea79f83ed083de784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12loplugin:unusedfieldsNoel4-53/+55
Change-Id: Id4b36c3f7c4fa2b28a8deae95c125911f51334b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12loplugin:unusedmethodsNoel1-88/+128
Change-Id: I90d402a5c18ab16424a042bcea1470fa8a3a5839 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105629 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12New loplugin:stringviewparamStephan Bergmann2-0/+433
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-11loplugin:stringviewNoel2-0/+284
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin1-0/+15
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11loplugin:xmlimport add more checksNoel Grandin2-0/+113
to find places where the slowparser -> fastparser conversion work is incomplete, fixing one bug in the process. Change-Id: Ifd0d801d71eee0aaf25287fbac1a4237a811e7c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105511 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-10new loplugin:reducevarscopeNoel Grandin2-0/+646
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-10Evaluate command: tdf#109338dante1-0/+1
Adds evaluate command. It's visible from UI as a bracket. Example: evaluate { {1} over {%sigma sqrt{2%pi} }func e^-{{(x-%mu)^2} over {2%sigma^2}} } from { -infinity } to { +infinity } = 0 In order to make the mathml part, several changes had to be mad: - Allow mathml to correctly identify the math token for opperators - Allow mathml to correctly identify the math token for fences - Since improvements where made on token recognision, visitors to string can now be lighter ( removing long long switch ) - Improving the import / export to mathm - LO says it mathml 2, but actually is something between 2 and 3 - Allowing mfenced ( mathml 2.0 ) to stayl 3 adding the missing data ( prefix and postfix ) - Be able to know if we are opening or closing brackets - lrline and lrdline commands hidden on UI. - They are they own open close - If prefix and postfix are missing meaning of the expression may change, however that's the user problem. - The problem resides in the fact that MS_VERTLINE is uses for lline and rline. - The problem resides in the fact that MS_DVERTLINE is uses for ldline and rdline. - Changing frac priority from 0 to 5, if not { frac 1 2 frac 1 2 } fails ( found while testing ) - The mathml testing was made with highter standars than qa tests, however there are no guarantees. - Added xml tokens needed for math - Added starmathdatabase. Will grow in the future. The point is avoiding long lists and swtches inside code. Added it command for hidden or implicit product ( like &it; in mathml ). Oppens path for tdf#66200. Note that about this issue there is only one line on the parser. The mathml implementation will be made later when LO will allow chars with &charname;. Change-Id: If24b40c2420d39498693944f13a02985f997dd23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06retire the stringbuffer lopluginNoel1-0/+0
the best code is now the opposite of what this plugin recommends Change-Id: I88c04200c73a9bae07ef8fcf6ba5f1d9e4927709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06loplugin:unusedfieldsNoel5-157/+139
Change-Id: Ib360179887572ec55245d7892651eaf7113ed3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06loplugin:unusedmethodsNoel1-238/+226
Change-Id: Ia6c0361cd793bb62905b0690f7e2ca554019e935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05loplugin:unusedenumconstantsNoel4-7530/+3398
Change-Id: I9a2eb83647d6620b3c5b5ed5642227be47a657f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105303 Tested-by: Jenkins Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04copy_paste_error: "clazz" looks like a copy-paste errorCaolán McNamara1-1/+1
Change-Id: Idc87fcca5da166a532792516277d8199c2558de5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04loplugin:constantparamNoel5-1005/+967
Change-Id: Ia2fea86f940d0d2d1dba5ed56660584f3d3fb028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03Avoid UBSan pointer-overflowStephan Bergmann1-0/+17
...as seen with recently introduced UITest_writer_tests UITEST_TEST_NAME=compareDocuments.compareDocuments.test_tdf137855, but where the unsigned sal_uLong (aka sal_uIntPtr) value is apparently meant to wrap around and address an element of m_pMemory at a negative index from m_pBDiag: > sw/source/core/doc/doccomp.cxx:832:13: runtime error: addition of unsigned offset to 0x6250014a90d0 overflowed to 0x6250014a90b8 > #0 in (anonymous namespace)::Compare::CompareSequence::Compare(unsigned long, unsigned long, unsigned long, unsigned long) at sw/source/core/doc/doccomp.cxx:832:13 > #1 in (anonymous namespace)::Compare::CompareSequence::CompareSequence((anonymous namespace)::CompareData&, (anonymous namespace)::CompareData&, (anonymous namespace)::Compare::MovedData const&, (anonymous namespace)::Compare::MovedData const&) at sw/source/core/doc/doccomp.cxx:794:5 > #2 in (anonymous namespace)::Compare::Compare(unsigned long, (anonymous namespace)::CompareData&, (anonymous namespace)::CompareData&) at sw/source/core/doc/doccomp.cxx:605:25 > #3 in (anonymous namespace)::CompareData::CompareLines((anonymous namespace)::CompareData&) at sw/source/core/doc/doccomp.cxx:440:17 > #4 in SwDoc::CompareDoc(SwDoc const&) at sw/source/core/doc/doccomp.cxx:1877:13 > #5 in SwEditShell::CompareDoc(SwDoc const&) at sw/source/core/edit/editsh.cxx:877:34 > #6 in SwView::InsertMedium(unsigned short, std::unique_ptr<SfxMedium, std::default_delete<SfxMedium> >, short) at sw/source/uibase/uiview/view2.cxx:2377:39 > #7 in SwView::DialogClosedHdl(sfx2::FileDialogHelper*) at sw/source/uibase/uiview/view2.cxx:2574:26 [...] Using std::make_signed_t where its canonic type happens to be `long` requires a workaround for old Clang to avoid a false > CXXFunctionalCastExpr, suspicious cast from 'sal_uLong' (aka 'unsigned long') to 'std::make_signed_t<decltype(d)>' (aka 'long') [loplugin:toolslong] warning. Change-Id: I07413ba06051f75d80832a4772ab1c541805b259 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105234 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-03loplugin:unusedfieldsNoel4-315/+321
Change-Id: Ia8e2a7ce75bfded98e85fa583d1404710069d335 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03loplugin:unnecessaryvirtualNoel2-14/+30
Change-Id: I71c49cb66177547ce6f5bd4ab702c7d9d358a426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-02Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifc4b1c24b41a9ca7e7b3adcc46e3498f3af5a0b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105192 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-11-02create common macro and method for logging unknown attributesNoel1-4/+11
instead of repeating the code everywhere Change-Id: Idb94054b392ed256e64259cdb17d1522bf3c52b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02drop the SvXMLExport::EndElement method..Noel1-0/+4
in favour of just using the endFastElement() method Change-Id: Id95abb0b9e78bc44278c5e9e3cc8dee15185e2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02make SvXMLImport capable of mixing fast- and slow- contexts adhocNoel2-136/+308
so I can convert even *ImportContext subclasses in the middle of a context stack, and thus break the cyclic dependency nature of the writer import. and adjust the xmlimport loplugin for the new rules. As a consequence of the loplugin:xmlimport's checking, we remove a bunch of now unnecessary overrides of startFastElement. Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-29ne_lock::timeout is of type long, so keep using that hereStephan Bergmann1-1/+2
...partially reverting 4fbd63860500b2db76df4d5aedbe5e3aa31fac69 "switching long to a 64-bit type on 64-bit windows" Change-Id: I858630e5de76942a001ba619085ee07183df6ff6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104994 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-29Clean up loplugin:toolslong ignorelistStephan Bergmann1-2/+1
...after c070fac05fef41f788b53fe2c1f60519688a40b1 "Teach loplugin:toolslong about curl_easy_getinfo" Change-Id: Ia0c09c8d35fb7d023e3794532c240d53ee248752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104990 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28Extend loplugin:elidestringvar to OStringStephan Bergmann2-27/+32
(In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar] > aXmlWriter.content(sPdfConformance); > ^~~~~~~~~~~~~~~ > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar] > OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B"; > ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-27Teach loplugin:toolslong about curl_easy_getinfoStephan Bergmann1-0/+44
...see a9266c39cc71c6f23bfcad4ff6d33ccac53b5e52 "loplugin:toolslong (--enable-online-update)" arguing that "the third argument to curl_easy_getinfo(..., CURLINFO_RESPONSE_CODE, ...) must be a pointer to long". Change-Id: I7c542595219d2387cf869953fe40faef2b41b44f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104857 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-26Remove unmaintained Executable_libtestStephan Bergmann1-2/+1
<https://lists.freedesktop.org/archives/libreoffice/2020-October/086169.html> "Re: Is Executable_libtest still useful?": >> so I wonder whether that program is actually still maintained and used by >> anybody. (At least the last dozen or so changes to smoketest/libtest.cxx >> were of the generic loplugin/typos/tools::Long etc. kind, and we could spare >> ourselves future such work if we removed the file should it indeed be dead >> code.) > > I think this can be removed. https://gitlab.com/ojwb/lloconv does the > same and it seems to be maintained. Change-Id: I039e161ecf4904210e246e389cf4ba85124a66fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104803 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-26loplugin:toolslong (--enable-online-update)Stephan Bergmann1-1/+2
...but where > ~/lo/core/extensions/source/update/check/download.cxx:297:17: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong] > long nError; > ^~~~~~~~~~~ > ~/lo/core/extensions/source/update/check/download.cxx:153:9: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong] > long nCode; > ^~~~~~~~~~ were false positives (the third argument to curl_easy_getinfo(..., CURLINFO_RESPONSE_CODE, ...) must be a pointer to long). Change-Id: I9596ff32c32fddc7c1240d7fec3672d36265631a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104794 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-26loplugin:toolslong exclude pyuno fileNoel1-0/+5
Change-Id: I1b4b3f48e3195c31fb6b95932e9d4893829058dd
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel1-0/+556
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21Fix loplugin:salcallStephan Bergmann2-101/+59
For one, the addressOfSet filtering was only done for member functions, not for free functions, which caused false positives in the wild like the one discussed in the comments at <https://gerrit.libreoffice.org/c/core/+/102024/ 4#message-36ec6ee09ed5badae93c552b82a90068e65d19e2> "call xDesktop->terminate() when catching SIGTERM/SIGINT" regarding a free function `terminationHandlerFunction` passed to `osl_createThread`. For another, it failed to identify some cases where the address of a function is taken implicitly, like for `f3` in compilerplugins/clang/test/salcall.cxx. So make this plugin reuse the existing `loplugin::FunctionAddress` functionality (which also meant to get rid of this plugin's two-phase design). Change-Id: Ie290c63b03825d5288d982bc8701cfb886fc84b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104585 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-19clang-cl: Adapt Windows-specific code to extended loplugin:cstylecastStephan Bergmann1-1/+1
...after 1ebeacb20ad0165e399629fcfd7795ad0da3edf8 "Extend loplugin:cstylecast to certain function-style casts" Change-Id: I99bd383f5b3bee861d442d2e1be6ecd356b78315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104523 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-19tdf#136073 combine glow and softedge sidebar sectionandreas kainz1-7/+7
Change-Id: I19381009f5b286b051ae0cb90a794ed51a413a7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103835 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com>
2020-10-15Fix checks for "older than Clang 11"Stephan Bergmann5-8/+8
...following up on b6d0ca04581eae01817aac18d32a312bc9a2d514 "The Clang RecursiveASTVisitor change is already in Clang 11"; no longer sure why I originally wrote the checks using <= rather than < in 5d546de67b44dec23ecfa5a6378e2968912f8253 "Adapt to Clang 12 trunk RecursiveASTVisitor change" Change-Id: I79877e21823334c939ecdf9c64e4efe5e0b1571b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104349 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-14The Clang RecursiveASTVisitor change is already in Clang 11Stephan Bergmann5-8/+8
...see 5d546de67b44dec23ecfa5a6378e2968912f8253 "Adapt to Clang 12 trunk RecursiveASTVisitor change"; no longer sure why I thought <https://github.com/ llvm/llvm-project/commit/5689b38c6a4220cc5f6ba68a56486229b10071bf> "Removed a RecursiveASTVisitor feature to visit operator kinds with different methods" would not be included in the release/11.x branch Change-Id: I1e206368c447b74cc6adec4c1d4790c80f0cb744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104309 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-02drop these unused inlinesCaolán McNamara1-12/+0
Change-Id: I566be7eaf2ee73d3dac8c137ba783eea960cb586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103778 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-01loplugin:unusedfieldsNoel5-411/+305
Change-Id: Icd1dc03c2f783e11e3e52038a8ae9f19705561c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>