summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03Drop now unused SvtSlideSorterBarOptions classGabor Kelemen2-3/+0
Change-Id: I9db309b15e490c9bd03e767c192ba364a4ffe214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161452 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-30SvtAccessibilityOptions no longer loads settingsGabor Kelemen1-2/+0
Change-Id: Ia7404122029b6b7c6fe7ff879bb1143b3419fc32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161239 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-24Remove listeners of SvtAccessibilityOptionsGabor Kelemen1-4/+0
This class no longer notifies listeners since 2019 commit 3135d820d0172ef5695a4b97cec505e6ad03d67a so presumably the listeners can be dropped as well. The sd part tried to execute SID commands which seem to be removed since 2004 commit f77ad7f15f53526714518bb3562ba7de4ba0d45e Change-Id: I81d234aabe10b53278c89ffd846240507854d0c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161237 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-18-Werror,-Wdeprecated-declarationsStephan Bergmann26-76/+105
> compilerplugins/clang/casttovoid.cxx:452:18: error: 'endswith' is deprecated: Use ends_with instead [-Werror,-Wdeprecated-declarations] > .endswith(".h")); > ^~~~~~~~ > ends_with > ~/llvm/inst/include/llvm/ADT/StringRef.h:276:19: note: 'endswith' has been explicitly marked deprecated here > [[nodiscard]] LLVM_DEPRECATED( > ^ etc. after <https://github.com/llvm/llvm-project/commit/5ac12951b4e9bbfcc5791282d0961ec2b65575e9> "[ADT] Deprecate StringRef::{starts,ends}with (#75491)" on Clang 18 trunk, where <https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242> "[ADT] Introduce StringRef::{starts,ends}_width{,_insensitive}" had been added towards Clang 16 Change-Id: Icb3e43b7d6be6f877815285913d846f766eddebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160919 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-13loplugin:unusedfieldsNoel Grandin4-104/+86
The sPassword field in SvtHistoryOptions became redundant after commit c0fffdc36df687fe8e4eff49e5a00d3a3c1eb370 Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Date: Mon Oct 2 12:35:21 2023 +0200 [API CHANGE] Remove deprecated Password config item Change-Id: Ie0c4597da5cd510f405400c215110c1e357cb497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-13loplugin:unusedmethodsNoel Grandin2-87/+117
Change-Id: Id0aed0077ed121fdaef574248427a3425248e7d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-11-Werror,-Wdeprecated-declarationsStephan Bergmann1-3/+3
> compilerplugins/clang/pluginhandler.cxx:67:71: error: 'getName' is deprecated: Use FileEntryRef::getName() instead. [-Werror,-Wdeprecated-declarations] > 67 | compiler.getASTContext().getSourceManager().getMainFileID())->getName()); > | ^ > ~/llvm/inst/include/clang/Basic/FileEntry.h:331:3: note: 'getName' has been explicitly marked deprecated here > 331 | LLVM_DEPRECATED("Use FileEntryRef::getName() instead.", "") > | ^ > ~/llvm/inst/include/llvm/Support/Compiler.h:155:50: note: expanded from macro 'LLVM_DEPRECATED' > 155 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX))) > | ^ > compilerplugins/clang/pluginhandler.cxx:355:35: error: 'getName' is deprecated: Use FileEntryRef::getName() instead. [-Werror,-Wdeprecated-declarations] > 355 | StringRef const name = e->getName(); > | ^ > ~/llvm/inst/include/clang/Basic/FileEntry.h:331:3: note: 'getName' has been explicitly marked deprecated here > 331 | LLVM_DEPRECATED("Use FileEntryRef::getName() instead.", "") > | ^ > ~/llvm/inst/include/llvm/Support/Compiler.h:155:50: note: expanded from macro 'LLVM_DEPRECATED' > 155 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX))) > | ^ since <https://github.com/llvm/llvm-project/commit/d1f86c3d03b7549eb0153c62550ef0f513ff50e8> "[clang] NFC: Deprecate `FileEntry::getName()` (#68157)" on LLVM 18 trunk. (clang::SourceManager::getFileEntryRefForID exists since <https://github.com/llvm/llvm-project/commit/4dc5573acc0d2e7c59d8bac2543eb25cb4b32984> "Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations" towards Clang 10, even when it changed its return type from Optional<FileEntryRef> to OptionalFileEntryRef along the way.) Change-Id: Ie37ba20c18f5ec33bab9ca2a96a9bcf722558c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160561 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-30Extended loplugin:ostrStephan Bergmann2-2/+91
Change-Id: I987d6d60ca2d1e8ed8b8cde1e0c7996c0fff71b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160006 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-25loplugin:fieldcast in DomainMapper_ImplNoel Grandin1-3/+0
Change-Id: I1d734e1d30b91b84d42067b9cc621581ad744a40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-25loplugin:fieldcast in SwOneExampleFrameNoel Grandin1-3/+0
Change-Id: Ic00ad388b2c18d90075db8e8d0d6b114ed13841a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-24loplugin:fieldcast in ScXMLImportNoel Grandin1-3/+0
Change-Id: I0820427504d0cb9e14b54bb92a2e383bf0137121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-24loplugin:fieldcast in oox::xls::PivotTableNoel Grandin1-3/+0
Change-Id: Ie50626b2e24bba2ee67827afcdf42c1c0ed2c9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159870 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-23loplugin:fieldcast in DbGridControlNoel Grandin1-6/+0
Change-Id: I87b1aa0326cbd4270ca54831b3388a5da9c9416d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-23loplugin:fieldcast in LayoutManagerNoel Grandin1-3/+0
Change-Id: I3fc7a2c690344ee6934111cdffc0b23ff2537b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159841 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-23loplugin:fieldcast in LayoutManagerNoel Grandin1-3/+0
Change-Id: Ib0b56703cd6782d850ab5960a7fa53d15eb443a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-23loplugin:fieldcast in BindingNoel Grandin1-3/+0
Change-Id: Ia4bb341dba0c853b53c42a36fcb472e5948f1708 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159839 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-22loplugin:fieldcast in SwTransferableNoel Grandin1-3/+0
Change-Id: I8e9f157a399f1b305d2e6b6e63da837f0090fd8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-15Extend a loplugin:ostr check from OUString to OStringStephan Bergmann2-26/+75
Change-Id: I0776ab0ab376d6181461d2c144a4107b06233829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159470 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15Add back test for struct initializationStephan Bergmann1-0/+3
...that had been removed as part of f99bee8103ad82dac2e53e114527399c4af5485c "Delete OUString UTF-16 string literal ctor/assignment op" Change-Id: I22423306ab35dcb580ecc90daea3219b6c1578b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159446 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-15loplugin:unusedmethodsNoel Grandin2-169/+191
Change-Id: I1e125bbd388953491b3f869641484fea737d39ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-14loplugin:unusedfieldsNoel Grandin4-308/+336
Change-Id: I5869e9974c37b1b525d316367f1dc5051d8aa197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-14Adapt compilerplugins/clang/test/fieldcast.cxx to clang-clStephan Bergmann1-0/+7
...where loplugin:locking2 is disabled Change-Id: Id58cbedab191c59b901ef1a0e0dd82b8f8438c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159400 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-11loplugin:fieldcast improvementsNoel Grandin3-391/+93
reduce false positives, and also check reinterpret_cast Change-Id: Ia6f214393f28451d18c16b764a3c2b149d29ba8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-09Fix typoAndrea Gelmini1-1/+1
Change-Id: I3933be04cacda3dd271c20b2248561da85a069b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159190 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-08Adapt expected diagnostic output to clang-cl and the MSVC standard libraryStephan Bergmann1-2/+2
Change-Id: Ie416e4170280b9f05ecac359655e71f65a525592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159131 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08Adapt compilerplugins/clang/test/locking2.cxx to clang-clStephan Bergmann1-0/+6
...where loplugin:locking2 is disabled Change-Id: Ie6a241ac49670e47001cba67c7af9996623a23ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159109 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08Adapt loplugin:stringconcatliterals to clang-clStephan Bergmann2-6/+21
...whose handling of PredefinedExpr (representing `__func__`) deliberately differs in IgnoreParens and IgnoreParenImpCasts, see the comment in StringConcatLiterals::isStringLiteral Change-Id: I8b001d65369adc3d2a2c47e0cf32578a72ef4eec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159111 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-08new loplugin:fieldcastNoel Grandin4-0/+1342
new plugin to look for class fields that are always cast to some subtype, which indicates that they should probably just be declared to be that subtype. Perform one of the suggested improvements in xmlsecurity/ Change-Id: Ia68df422c37f05cbcf9c02ba5d0853f8eca4f120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-06Adapt to various Clang 18 trunk enum reworkStephan Bergmann7-12/+58
<https://github.com/llvm/llvm-project/commit/a9070f22a29e28f7d6f83c24a8dd88f3a94969ae> "[clang][NFC] Refactor `CXXConstructExpr::ConstructionKind`", <https://github.com/llvm/llvm-project/commit/c23aaa410358b9f9c364ddaaeb6b2069b185a99b> "[clang][NFC] Refactor `CharacterLiteral::CharacterKind`", <https://github.com/llvm/llvm-project/commit/3e6ce58701a3a8463b53fb3fd2023c02b4e90554> "[clang][NFC] Refactor `StringLiteral::StringKind`", <https://github.com/llvm/llvm-project/commit/edd690b02e16e991393bf7f67631196942369aed> "[clang][NFC] Refactor `TagTypeKind` (#71160)" Change-Id: Ice802f6d662494781ad22fcf11ea5006de918254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158983 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-06lok: notebookbar: handle multiple sessionsSzymon Kłos1-0/+1
This fixes regression from commit db5a78c8ab1eae30e442151f07b0dc4dcd017550 lok: notebookbar: don't recreate toolbars too often When we had 2 sessions with notebookbar and one of them switched to compact mode - other session's notebookbar didn't work. Before previous change we recreated notebookbar and its welded wrapper on every StateMethod call for LOK case. So when it become destroyed we made it working again. But now we need to introduce better management and not rely on single instence we get from SystemWindow. Also it's bad idea to rely 100% on SfxNotebookBar::IsActive in LOK case as when other view will turn notebookbar off, but QueryState will be trigerred in our session - we will think that it should be destroyed (it reads config state which is shared between views). So trust only "true" value (it happens after calling SID_TOOLBAR_MODE), but destroy notebookbar only after explicit call of SfxNotebookBar::CloseMethod. It seems to have good result when tested with multiple views in Online. Maybe we can track Notebookbar state per view later to make things simpler in LOK case. Change-Id: Ie739c6441ca05884b0ef20bff23751467706b562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158936 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-11-05loplugin:ostr: Warn about literals that could be string_viewStephan Bergmann2-0/+55
...inspired by d4f4a401861e7c908b6ab7f72563d5ab911edcf0 "This function takes a string view - no need in OUString literal", but this found no further cases Change-Id: I1429950afdb6fff8ed1d28f5fbb4c445fb6bfb12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158954 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-04Adapt to Clang 18 trunk Linkage reworkStephan Bergmann6-5/+20
<https://github.com/llvm/llvm-project/commit/8775947633bf189e1847707932b1015f04640ea0> "[clang][NFC] Refactor clang::Linkage" Change-Id: I35e3a3c7e3de29e4f3b9ee8dfc34e39ba2aa1c70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158919 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-03Suppress loplugin:redundantfcast also around C++20 CXXParenListInitExprStephan Bergmann2-2/+27
...which is used by <https://github.com/llvm/llvm-project/commit/95a4c0c83554c025ef709a6805e67233d0dedba0> "[clang] Reland parenthesized aggregate init patches" for the __cpp_aggregate_paren_init feature implemented since Clang 16, and which had caused bogus warnings in patch set 1 of <https://gerrit.libreoffice.org/c/core/+/158838/1> "tdf#157028 vcl: PDF export: inline OBJR dictionaries" Change-Id: Id4118ce8d53902388ca3a80ad03f12b59e3a35e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158842 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02Fix typoStephan Bergmann2-2/+2
...spotted by Ilmari Change-Id: I7414d77d91a4d11d16de1417e60cddf72a0746c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158782 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02Adapt to Clang 18 trunk ElaboratedTypeKeyword reworkStephan Bergmann2-1/+10
<https://github.com/llvm/llvm-project/commit/4ad2ada5216ee2bb3c334a3233a9ab51f2521b82> "[clang][NFC] Refactor ElaboratedTypeKeyword" Change-Id: I1ee6592fe76bb484441ca859986e7217eaba58f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158764 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-01new loplugin:fieldcanbelocalNoel Grandin3-0/+710
Change-Id: I33fe8afcbba1d461bee98c92507c878e4e5d41d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann1-8/+0
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-21Extended loplugin:ostr: Automatic rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann2-6/+248
Change-Id: I8c08bf41b96d4a6085e7d72cb39e629efa556d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158300 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann3-170/+16
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-14get_iter_abs_pos doesn't neeed to be virtualCaolán McNamara1-2/+0
Change-Id: If69768ffac37aa7b39a806b3c67ad8cbdafc5d2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157981 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-12loplugin:unusedmethodsNoel Grandin2-65/+47
Change-Id: I27782fb4b912d8b0d5f19cbe296c2a3b98b2bfd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-11__cpp_char8_t is generally available nowStephan Bergmann1-4/+0
...after 1eef07805021b7ca26a1a8894809b6d995747ba1 "Bump baseline to C++20" Change-Id: I75509f3731357e0e3ae73c3774abd6e4070f605b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157806 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Delete OUString UTF-16 string literal ctor/assignment opStephan Bergmann6-138/+9
...that have been made unused by 7ef3d937415185ef66e32dd3043783eddcd03db5 "loplugin:ostr: Rewrite some uses of O[U]String to use ""_ostr/u""_ustr literals". (And which means we can remove the relevant code from that plugin again.) (This also found a handful of remaining uses that had been hard for the plugin to discover, along the lines of > std::map<OUString, int> m = {{u"foo", 0}}; being represented by a > DeclStmt 0xdaca578 <line:103:5, col:50> > `-VarDecl 0xdac9150 <col:5, col:49> col:29 s11 'std::map<OUString, int>':'std::map<rtl::OUString, int>' cinit destroyed > `-ExprWithCleanups 0xdaca548 <col:35, col:49> 'std::map<OUString, int>':'std::map<rtl::OUString, int>' > `-CXXConstructExpr 0xdaca508 <col:35, col:49> 'std::map<OUString, int>':'std::map<rtl::OUString, int>' 'void (initializer_list<value_type>, const std::less<rtl::OUString> &, const allocator_type &)' list std::initializer_list > |-CXXStdInitializerListExpr 0xdaca480 <col:35, col:49> 'initializer_list<value_type>':'std::initializer_list<std::pair<const rtl::OUString, int>>' > | `-MaterializeTemporaryExpr 0xdaca468 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' xvalue > | `-CXXBindTemporaryExpr 0xdaca448 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' (CXXTemporary 0xdaca448) > | `-InitListExpr 0xdac9df0 <col:35, col:49> 'const std::pair<const rtl::OUString, int>[1]' > | `-CXXConstructExpr 0xdaca408 <col:36, col:48> 'const std::pair<const rtl::OUString, int>' 'void (const char16_t (&)[4], int &&) noexcept(_S_nothrow_constructible<const char16_t (&)[4], int>())' list > | |-StringLiteral 0xdac91b8 <col:38> 'const char16_t[4]' lvalue u"foo" > | `-MaterializeTemporaryExpr 0xdaca3f0 <col:46> 'int' xvalue > | `-IntegerLiteral 0xdac91d8 <col:46> 'int' 0 > |-CXXDefaultArgExpr 0xdaca498 <<invalid sloc>> 'const std::less<rtl::OUString>':'const std::less<rtl::OUString>' lvalue > `-CXXDefaultArgExpr 0xdaca4b8 <<invalid sloc>> 'const allocator_type':'const std::allocator<std::pair<const rtl::OUString, int>>' lvalue Clang AST.) Change-Id: I496fe9d4d5e1a033cb7b27b4e04b303f8ddbed4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-09Add -rpath when building analyzer executable on macOSStephan Bergmann1-1/+3
...as at least with LLVM 18 trunk, the generated executable references @rpath/libclang-cpp.dylib but didn't actually contain an LC_RPATH Change-Id: Ida643903aa4566853ea9541553f0dfc9c3243d4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157706 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-09Avoid a false loplugin:casttovoid on macOSStephan Bergmann1-0/+5
...involving conditional preprocessed code at > vcl/skia/SkiaHelper.cxx:265:13: error: unnecessary cast to void [loplugin:casttovoid] > 265 | (void)blockDisable; > | ^~~~~~~~~~~~~~~~~~ > vcl/skia/SkiaHelper.cxx:286:22: note: first consumption is here [loplugin:casttovoid] > 286 | if (!blockDisable && !DefaultMTLDeviceIsSupported()) > | ^~~~~~~~~~~~ Change-Id: I222d72d240852be2d64fe08d345f00d137cd5a63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157707 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: Rewrite some uses of O[U]String to use ""_ostr/u""_ustr literalsStephan Bergmann2-0/+384
This is a first cut at rewriting uses of OUString constructed from u"..." as u"..."_ustr. It covers the same changes as <https://gerrit.libreoffice.org/c/core/+/155412/6/> "WIP: Delete OUString UTF-16 string literal ctor/assignment op", but does so with automatic rewriting (see e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 "loplugin:ostr: automatic rewrite", plus a handful of 002b0a9d5793e07609f953b9961b04bcab7a7e3f "loplugin:ostr: manual modifications" where automatic rewriting wasn't set up to handle macro bodies). The compilation-time impact of all those changes appears to be negligible: For some Windows build of mine, just touching the files that would be affected by 002b0a9d5793e07609f953b9961b04bcab7a7e3f and e0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 (but without actually applying those changes yet) and doing `time /opt/lo/bin/make -O check screenshot PKGFORMAT= gb_SUPPRESS_TESTS=x`, three times in a row reported sample real times of 21m15.438s 23m17.840s 23m41.529s and repeating all that with the two changes actually applied reported sample real times of 22m43.547s 21m42.687s 23m1.813s The plugin itself is already prepared to do further rewrites (see the TODOs), which will be done in follow-up commits. Change-Id: I408ecf056dce1b9da683d7c377b8d9058df1558d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157676 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-24loplugin:unusedmethodsNoel Grandin2-279/+227
Change-Id: I231b80cb0779d92bba32da67f6878c07d757c967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-23tdf#105303: Drop html export wizardXisco Fauli3-8/+0
Done during the conference hackfest Change-Id: I765e6dc839a98038c4071c8444ce3db9293c8a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157173 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-09-19loplugin:unusedfieldsNoel Grandin4-224/+242
Change-Id: Ic102ae992fc2fbfd187149b9d20bf1d2202ba5c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157042 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-17remove unnecessary dynamic_cast around SwXTextNoel Grandin1-18/+24
Unusually, we cannot use rtl::Reference to hold SwXText, because rtl::Reference assumes that its pointee is a subclass of OWeakObject, which SwXText is not (and we cannot make it so because the UNO bridge does not support virtual base classes). So we have to use css::uno::Reference<SwXText> and carve out an exception in loplugin:refcounting. Change-Id: If3a1307e30fdcd3b47aa665252be081fb5063400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>