summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2020-11-18loplugin:stringviewparam: No good reason to exclude operator functionsStephan Bergmann
(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 constructorsNoel
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 tooNoel
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 Bergmann
<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 Bergmann
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 Grandin
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 pluginsNoel
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:xmlimportNoel
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:unusedfieldsNoel
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:unusedmethodsNoel
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 Bergmann
...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:stringviewNoel
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 Grandin
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 Grandin
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 Grandin
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#109338dante
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 lopluginNoel
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:unusedfieldsNoel
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:unusedmethodsNoel
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:unusedenumconstantsNoel
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 McNamara
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:constantparamNoel
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 Bergmann
...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:unusedfieldsNoel
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:unnecessaryvirtualNoel
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 Gelmini
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 attributesNoel
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..Noel
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 adhocNoel
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 Bergmann
...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 Bergmann
...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 Bergmann
(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 Bergmann
...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 Bergmann
<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 Bergmann
...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 fileNoel
Change-Id: I1b4b3f48e3195c31fb6b95932e9d4893829058dd
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel
(*) 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 Bergmann
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 Bergmann
...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 kainz
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 Bergmann
...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 Bergmann
...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 McNamara
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:unusedfieldsNoel
Change-Id: Icd1dc03c2f783e11e3e52038a8ae9f19705561c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-30loplugin:unusedmethodsNoel
Change-Id: I4f5262af08bb35540e6330775a91df42e4c9977e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-21static_assert that O[U]StringLiteral are layout compatible with rtl_[u]StringStephan Bergmann
...as was suggested by Mike Kaganski in a comment at <https://gerrit.libreoffice.org/c/core/+/102222/10# message-aa8bcf42f04686766440e2848c7d1f76f474f2f8> "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString". Doing so revealed that at least lopglugin:unusedmember needs to handle InjectedClassNameType as an alternative to RecordType in at least one place. (More places across compilerplugins might benefit from handling InjectedClassNameType too, but which did not lead to assertion failures for now and should be addressed in follow-up issues.) Change-Id: Icdb8b069324b5ce5f3c7c6b92989379ccb67fc8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103125 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-21weld infobarsCaolán McNamara
note: "pushed" status listener case dropped. Doesn't seem to be an expectation for it to something in infobars, and there doesn't seem to be a working case anyway. Change-Id: I7869cc05de9918f0dd70e28b0087205db6c9506c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-20loplugin:xmlimport check for bad conversions to fastparserNoel Grandin
add a check for classes which have been partly converted to fastparser, but not completedly. This is to help me when I convert stuff. and it uncovers a bug introduced with commit 998308c363dfad03143591aa18256d2669b4da11 use more FastParser in SvXMLStylesContext Change-Id: Ib50e7136da10a1a7a346102aa47efef2f543e2ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-17Adapt compilerplugins/clang/test/unusedvarsglobal.cxxStephan Bergmann
...to e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString". (The original code would have started to fail with > error: 'error' diagnostics seen but not expected: > File compilerplugins/clang/test/unusedvarsglobal.cxx Line 22: declaration of variable 'literal1' with deduced type 'const OUStringLiteral' requires an initializer when built with Clang >= 11.) Change-Id: If51a39c8fb42200f064d62f472e8cddcc6e4c434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102898 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins