summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2018-03-23...in which case .. path segments need to be resolved in SearchPath, tooStephan Bergmann
...for cases like > In file included from vcl/source/outdev/hatch.cxx:32: > vcl/source/outdev/../gdi/pdfwriter_impl.hxx:47:10: error: replace "..." include form with <...> for inclusion of a source file not next to the current source file, or a header, vcl/source/outdev/../gdi/pdffontcache.hxx [loplugin:includeform] > #include "pdffontcache.hxx" > ^~~~~~~~~~~~~~~~~~ Change-Id: Ib486e0cf16a157b90f838536a15c40c2a34ef72b
2018-03-23Check isOkToRemoveArithmeticCast in loplugin:redundantfcast tooStephan Bergmann
...to avoid warnings like > C:/lo64/core/svx/source/table/accessiblecell.cxx(400,12): error: redundant functional cast from 'long' to 'sal_Int32' (aka 'long') [loplugin:redundantfcast] > return sal_Int32(0x0ffffffL); > ^~~~~~~~~~~~~~~~~~~~~ with clang-cl Change-Id: I4a48a9f10ad75f76a3c6ab6152ab279df9a3fbcc Reviewed-on: https://gerrit.libreoffice.org/51780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-23Handle .. path segments in loplugin:includeform againStephan Bergmann
...after 119d8137695e38c16e9fad9f3ce8a774f58e4b9a "Revert 'Allow compiler plugins for online'", to fix cases like > In file included from vcl/unx/gtk3_kde5/gtk3_kde5_cairo.cxx:20: > vcl/unx/gtk3_kde5/../gtk3/cairo_gtk3_cairo.cxx:12:10: error: replace "..." include form with <...> for inclusion of a source file not next to the current source file, or a header, vcl/unx/gtk3/cairo_gtk3_cairo.hxx [loplugin:includeform] > #include "cairo_gtk3_cairo.hxx" > ^~~~~~~~~~~~~~~~~~~~~~ Change-Id: I12b3049862825f10834333b154c9343a3e3bec6d
2018-03-23Revert "Allow compiler plugins for online"Stephan Bergmann
This reverts commit b39e627be45f847554f11fdac040b6f4da4054ba. The assumed (see comment at <https://gerrit.libreoffice.org/#/c/46769/4/compilerplugins/clang/ plugin.cxx@633>) performance bottleneck of isSamePathname -> getAbsolutePath does show up in Flamegraph inspections of LO builds. But changing (non-member function) isSamePathname to only call getAbsolutePath if (PluginHandlder member function) isLOOLMode is true would need some code reorg, and Online development doesn't seem to make too much actual use of the plugin, so conclusion on IRC was to revert. Change-Id: I0f04fdcc87087dac516630ed5e48361f5ea332ca Reviewed-on: https://gerrit.libreoffice.org/51774 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-15loplugin:unusedmethodsNoel Grandin
Change-Id: Ice171112d3e737cf0e0edabbc59a1307a4a4f5ad Reviewed-on: https://gerrit.libreoffice.org/51282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-14loplugin:unusedmethodsNoel Grandin
Change-Id: I7c780be3e2740fd9b03c39ebe16935d61caf4f7e Reviewed-on: https://gerrit.libreoffice.org/51257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-13loplugin:unusedmethods remove unused code from canvasNoel Grandin
which my plugin had previously been ignoring. Since that time, the plugin has gotten a little smarter, and makes less mistakes. Change-Id: Id791c932fd056ae7da833436c4dd2600b69a0bfa Reviewed-on: https://gerrit.libreoffice.org/51212 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12loplugin:unusedmethodsNoel Grandin
Change-Id: I027adbe65edd5f07534bb36f9f54c55f30ba516e Reviewed-on: https://gerrit.libreoffice.org/50998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-11weld color pickerCaolán McNamara
Change-Id: I487b9a0cc13b2b60a0f1e28667773b5d3b5c66cc Reviewed-on: https://gerrit.libreoffice.org/51001 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-10loplugin:unusedfieldsNoel Grandin
Change-Id: Idd0cdd38718c3822db4d4b94ca2315a416bc27bb Reviewed-on: https://gerrit.libreoffice.org/50997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-09loplugin:redundantfcast look for unnecessary temporariesNoel Grandin
when calling methods that take a const& Change-Id: Idf45dfd9fea0de6fae0b1f89550f2f7fc302aa15 Reviewed-on: https://gerrit.libreoffice.org/50970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08loplugin:constantparam ignore some SFX macro generated codeNoel Grandin
Change-Id: Ic5d9a17aeec51d59e26c49bbdf5719e6d8f6486f
2018-03-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08loplugin:unusedfieldsNoel Grandin
Change-Id: Id332557cbe7fb42d3d794612f26aa3ac161548d9 Reviewed-on: https://gerrit.libreoffice.org/50902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-04finalclasses : correct the comments with name in downcaseArnaud Versini
Change-Id: Iad623ff608d015e95fe226babff18241488dabf0 Reviewed-on: https://gerrit.libreoffice.org/50730 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-25Improve loplugin:dyncastvisibility a bitStephan Bergmann
Change-Id: Iab9d333d08a8b90a69f3a096e5f39baf3e7bb638 Reviewed-on: https://gerrit.libreoffice.org/50279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-23new loplugin:doubleconvert to with ColorData workNoel Grandin
Change-Id: Ib8f2ef485f548645c4b0e7cf080b72b28c4e278d Reviewed-on: https://gerrit.libreoffice.org/50226 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-22drop unused button mask enumCaolán McNamara
Change-Id: Id94c6ecdfc642888eea8c13e55d38326b2d7ad12 Reviewed-on: https://gerrit.libreoffice.org/50145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22rename redundantcopy loplugin to redundantfcastNoel Grandin
Change-Id: I34e28a30a4f1fd264c18c901cd94094531543271
2018-02-22loplugin:redundantcopy extend to ColorNoel Grandin
Change-Id: I224cc955d49ee100d328e0171da710f38068d2d4 Reviewed-on: https://gerrit.libreoffice.org/50114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21New loplugin:nestedunnamedStephan Bergmann
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c Reviewed-on: https://gerrit.libreoffice.org/50048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-21loplugin:changetoolsgen in svxNoel Grandin
and fix the regex in the plugin for matching += operator Change-Id: I26b3e3fac1d4ef3e756cc9431b983b5f27ee76d6 Reviewed-on: https://gerrit.libreoffice.org/50037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-19Remove now unused libgetuid.somichael.weghorn
Some scripts in which it was used have been removed (commit e1082e45361a92a31adedcc3ed0a35c704bca543) and the more reliable 'fakeroot' is now in use at all other places where libgetuid.so was previously used (s. tdf#115554). Change-Id: I638e96e5c8d671e3b145b79f33de718fe34ea514 Reviewed-on: https://gerrit.libreoffice.org/49837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-16loplugin:changetoolsgen various improvementsNoel Grandin
- use AdjustFoo variants of methods on Rect/Size/Point - ignore double assignments - improve error messages - handle expressions that include macros by using getExpansionLoc - replace ++X() with X() + 1 Change-Id: Ida6b06b2a92e9226168aff6b1b8031f5867687b4
2018-02-12rename loplugin changerectanglegetref to changetoolsgenNoel Grandin
Change-Id: I378f64ac0879d4c6ea574b1674e96ffb9cc89732
2018-02-12loplugin:changerectanglegetref also fix Point and SizeNoel Grandin
Change-Id: I373af0a62e3785c4abc2d27b0b31121c9d596ca3
2018-02-12fix loplugin rewriter source range checkingNoel Grandin
after commit 94ab8e4360a2a7a932656e99f718244321d0f923 Date: Fri Feb 9 15:28:41 2018 +0200 improve loplugin rewriter double source modification detection Change-Id: Ibf0a64fe4cc3dd6bf5ae16672b3d748a842196e4
2018-02-10improve loplugin rewriter double source modification detectionNoel Grandin
because my new rewriter easily generates overlapping rewriting. Move the code from flatten and salcall up into the pluginhandler, and drop the simpler detection logic. Change-Id: I3da51ac510954a5d4276cee0924cc5dc1fc9a734 Reviewed-on: https://gerrit.libreoffice.org/49493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-09add setter methods to tools::RectangleNoel Grandin
intended to replace the existing methods that return mutable ref And add the clang rewriter I will use to do most of the work. Change-Id: If00be13da5c16c07671cedbcfea21528bac33c8a Reviewed-on: https://gerrit.libreoffice.org/49430 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-06remove debugging codeNoel Grandin
Change-Id: Ia5018354a764f900091cb5e03327721fa66591c9
2018-02-05loplugin:useuniqueptr in ImpEditEngineNoel Grandin
Change-Id: I5afc846c803f5191bb5e04590923059e88434b76 Reviewed-on: https://gerrit.libreoffice.org/49176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02remove connectivity OSubComponentNoel Grandin
push the logic that is still necessary down into the subclasses Change-Id: I99424f0b3c654c5652991a4140b17ceb02224e50 Reviewed-on: https://gerrit.libreoffice.org/49087 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02loplugin:useuniqueptr in i18npoolNoel Grandin
Change-Id: Iff39b9298bfad474c5c011b6355b8ebf5be06318 Reviewed-on: https://gerrit.libreoffice.org/49091 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02loplugin:singlevalfieldsNoel Grandin
Change-Id: I346f236e28cb0bd064a7d757b187e5e64544700f Reviewed-on: https://gerrit.libreoffice.org/49086 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02loplugin:datamembershadow in PopupMenuToolbarControllerNoel Grandin
this looks like an oversight, just use the baseclass member Change-Id: Ida36be64266bbc33a6bd1d89dcb665d24a6dd83f Reviewed-on: https://gerrit.libreoffice.org/49075 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02teach useuniqueptr loplugin about while loopsNoel Grandin
and reduce code duplication Change-Id: I292d7515b15fce4cf1714c3b11b947493706bc3c Reviewed-on: https://gerrit.libreoffice.org/49090 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-01these TODOs have been doneNoel Grandin
Change-Id: I5457f38f4668175a8f3e1b0f24a90963ee9d585f Reviewed-on: https://gerrit.libreoffice.org/49076 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-01Fix typosAndrea Gelmini
Change-Id: Icb4f4d9039278318d5f7f6302d57957b2c02bdb8 Reviewed-on: https://gerrit.libreoffice.org/49069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-01loplugin:datamembershadow in XFCellStyleNoel Grandin
looks like the subclass member is never written to, so I'm going to assume this was a bug Change-Id: Ic56c4a30cd139415eb08c4d572273dad2411b514 Reviewed-on: https://gerrit.libreoffice.org/49001 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-31loplugin:datamembershadow in lotuswordproNoel Grandin
Change-Id: I50f37e09df6c4c7cbe697e3419731e637c980807 Reviewed-on: https://gerrit.libreoffice.org/49000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-31tdf#114596 compilerplugins: add exception to [loplugin:refcounting]Michael Stahl
Change-Id: I994653dc4bf858bdea7ba60f40da0ee3c8d028e4
2018-01-29Fix typosAndrea Gelmini
Change-Id: Iedd82d035454c940d76a94c7e910c81827c1389c Reviewed-on: https://gerrit.libreoffice.org/48828 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-29loplugin:useuniqueptr in ModelData_ImplNoel Grandin
Change-Id: I66866ed1698fafe59ba31f99df09fb792da410e3 Reviewed-on: https://gerrit.libreoffice.org/48702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-26loplugin:datamembershadow in SmartHdlNoel Grandin
rename both these fields Change-Id: I7c414bb440872cdc36d29613be52a5a7542ff9bb Reviewed-on: https://gerrit.libreoffice.org/48565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:datamembershadow in PresenterPaneNoel Grandin
the subclass field is just a copy of the parent field, so drop the subclass, and consequently simply the CreateCanvases method, we don't need to pass the parameter down, can just access the parent field. Change-Id: I3be448a06b32d01cdda4fc36b78cafb4488e2913 Reviewed-on: https://gerrit.libreoffice.org/48553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:datamembershadow in SvxUnoTextRangeBaseNoel Grandin
make the superclass member private Change-Id: I665d87bfdfc3d7804cd4cac6108f9bc65b9ca2b5 Reviewed-on: https://gerrit.libreoffice.org/48552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25loplugin:datamembershadow in SdXMLShapeLinkContextNoel Grandin
in this case, we can just drop the child member and re-use the parent member. The parent class barely contains any logic anyway. Change-Id: I520217c04a38b66323a76bf5fddb476bd3fc8e15 Reviewed-on: https://gerrit.libreoffice.org/48551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:constparamsNoel Grandin
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504 Reviewed-on: https://gerrit.libreoffice.org/48392 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>