summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2017-03-28update results of mergeclasses pluginNoel Grandin
Change-Id: I97f67bb7f98d0cf0a835f55e12c24a30ffd4ed3d
2017-03-28fixes for some lopluginsNoel Grandin
ran the ones in store/ just for fun, but didn't find anything useful Change-Id: I2bb251e8d99b5d88e11b2ca74e99672d75f0a1fd
2017-03-27Make loplugin:loopvartoosmall look past top-level ExprWithCleanupsStephan Bergmann
Note the two "//TODO!" in the fix of the one newly found issue. Change-Id: I181691da4b74cd55611452e002b37bd6798ff1e6
2017-03-27create SfxInterfaceId o3tl::strong_intNoel Grandin
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6 Reviewed-on: https://gerrit.libreoffice.org/35722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Make loplugin:loopvartoosmall find more suspicious casesStephan Bergmann
...where the "controlling expression" of any sort of loop contains a sub- expression of the form var < val where the type of var is smaller than that of val. Theoretically, this could turn up lots of false positives, but practically it didn't run into any. Most findings have been cleaned up over the last weeks. There's just a handful remaining places that are hard to clean up, so I flagged them here with (deliberately awkward) sal::static_int_cast for later clean-up. Change-Id: I0f735d46dda15b9b336150095df65cf247e9d6d3 Reviewed-on: https://gerrit.libreoffice.org/35682 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25Add loplugin:redundantinlineStephan Bergmann
...after it had recently been run with 6cb9e6dad798ec59f055aebe84a9c4a21e4be40d "Remove redundant 'inline' keyword" Change-Id: I7f3ee2ff1c32988dcff7245c64b50fe20b0a5e79 Reviewed-on: https://gerrit.libreoffice.org/35681 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25Teach loplugin:redundantcast about C-style casts in macro bodiesStephan Bergmann
Change-Id: Ic1fbc8dd16c4d78772fc11a9c2ce09f056e36c79 Reviewed-on: https://gerrit.libreoffice.org/35680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25Fix typosAndrea Gelmini
Change-Id: If92860597a44ee79b513d255ce3f21112485a97e Reviewed-on: https://gerrit.libreoffice.org/35617 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-24loplugin:unusedfieldsNoel Grandin
improve the plugin to find fields which are only assigned to in the constructor Change-Id: I95b5be238ebba83d950ca15093abdd1849740359 Reviewed-on: https://gerrit.libreoffice.org/35613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22Use nl_langinfo_l with an explicitly created localeStephan Bergmann
(where empty string arg to newlocale, per SUSv4, means "an implementation- defined native environment. This correspons to the value of the associated environment variables, LC_* and LANG") instead of relying on whatever setlocale would be in effect here. Also, nl_langinfo_l is less of an MT nightmare than nl_langinfo, which is of benefit once the last remaining use of nl_langinfo in sal/osl/unx/nlsupport.cxx will also have been changed to nl_langinfo_l. loplugin:nullptr needs a little hack, as SUSv4 locale_t could be anything from an integer type to a pointer type. Change-Id: Ic35dcbc2e0a4f650694b48df12470dd89476dff5
2017-03-22loplugin:redundantcast find redundant c-style enum castsNoel Grandin
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349 Reviewed-on: https://gerrit.libreoffice.org/35467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-21New loplugin:unicodetocharStephan Bergmann
Change-Id: I279fe1dec196b6e1e551b4f6aba77f24e3f76ab7
2017-03-13Minor loplugin:unnecessaryoverride improvementStephan Bergmann
Change-Id: I3afb31b642a47e767dda0614d223b6b7f22e5d54
2017-03-13Fix loplugin:unnecessaryoverrideStephan Bergmann
(user-provided virtual dtor in class with dependent base) Change-Id: I37b3cc3d32e76a0286ecc91f999920e3dfe706cc
2017-03-11Fix typosAndrea Gelmini
Change-Id: Ic54e808956e5cf4e8079942c0ff799f802cd4b6c Reviewed-on: https://gerrit.libreoffice.org/35053 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08gpg4libre: Remove deprecated dynamic exception specificationsSamuel Mehrbrodt
Change-Id: I3bec4570149af50fad5eef33bafb9842ab598798 Reviewed-on: https://gerrit.libreoffice.org/34967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-04gpg4libre: List and view GPG keysSamuel Mehrbrodt
* Add GPG implementation of css::xml::crypto UNO interfaces (part of that is only stub atm) * List gpg keys along with other certificates * Viewing gpg certificates: Not all properties are implemented yet Change-Id: I7f60b26efe949a94bf8fe1b8d4d428002c2995b1 Reviewed-on: https://gerrit.libreoffice.org/33843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-03remove unused CreateDefault methodsNoel Grandin
Change-Id: Ifbdd7d41f0938e9a03693f88416792ff8087f8c2 Reviewed-on: https://gerrit.libreoffice.org/34850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Fix typosAndrea Gelmini
Change-Id: I4f16ba5fc32cbfd6a5b01e495f3ad905da193524 Reviewed-on: https://gerrit.libreoffice.org/34808 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28Adapt loplugin:sallogareasStephan Bergmann
...to b6a69585b00867005820c1dd94e10e0e6b545e2a "old sal_detail_log_backtrace into sal_detail_log" and follow-up c697ae306cd4eaa8144ed93fc908e50d5934e249 "Some clean up" Change-Id: Ie38899e70c5b326724f9442fbf92e453b05eec01
2017-02-28new loplugin unoanyNoel Grandin
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-23New loplugin:subtlezeroinitStephan Bergmann
Change-Id: I4530021d78f714d389833bd00ea87430d1d20f52
2017-02-20remove unused enumerators from PrinterCapTypeNoel Grandin
Change-Id: Id4f788dfae64e7a9bcde16af2db2ddeafaf6900e Reviewed-on: https://gerrit.libreoffice.org/34468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20convert StringType to scoped enumNoel Grandin
and drop unused FormulaValue enumerator Change-Id: Ide6026b841db224947d7d559c110dfc7da3cd975 Reviewed-on: https://gerrit.libreoffice.org/34467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20remove unused ModalDialogue from WMWindowType enumNoel Grandin
Change-Id: I22269d6d1868b744f48274ff53ca46fa93ce9fc1 Reviewed-on: https://gerrit.libreoffice.org/34455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20remove some unused enumeratorsNoel Grandin
Change-Id: Idb9080f9c2edd838385d78b64e61ab49e93fe54b Reviewed-on: https://gerrit.libreoffice.org/34373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-17convert FormulaCompiler::SeparatorType to scoped enumNoel Grandin
and drop unused COMMA_BASE enumerator Change-Id: I5f35ba7453d5ca613ebd65d0853c7caaa210f3de Reviewed-on: https://gerrit.libreoffice.org/34357 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-17isAssignmentOp is not available on older clangNoel Grandin
Change-Id: I1ee7a8266a2ad0e14a28fab7aa0095b15647d5b0
2017-02-17convert StackMode to scoped enumNoel Grandin
and drop unused AMBIGUOUS enumerator Change-Id: I71954d75a64928061c0e520beb47f979c53ee5a8
2017-02-17convert PropertyType to scoped enumNoel Grandin
and drop unused enumerators Change-Id: I61d2a46ed84ce4163757a2da58162c72b1b0950f
2017-02-17convert ValueParser::State to scoped enumNoel Grandin
Change-Id: I20c8217576fb6993107f1e45429adc5660d38da8
2017-02-17remove unused NONE from TAscendingOrder enumNoel Grandin
Change-Id: I31c793df40b2a687b4a6c84854f34aba72ac0494
2017-02-17teach loplugin unusedenumconstants about CXXOperatorCallExprNoel Grandin
fixes some false+ in the write-only analysis Change-Id: Ie7905c05c8012820c640064d451b33badb04c5fc
2017-02-17convert SbxNameType to scoped enumNoel Grandin
and drop unused enumerators Change-Id: I2b47828b2146fcda335f1dc1c1f61a1139abbe19
2017-02-16Silence loplugin:redundantcast false warningStephan Bergmann
...that is curiously only reported when building with clang -std=gnu++17: > sc/qa/unit/ucalc_condformat.cxx:185:80: error: redundant const_cast from 'ScConditionalFormat *' to 'const ScConditionalFormat *', result is implictly cast to 'const ScConditionalFormat *const' [loplugin:redundantcast] > CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong conditional format instance.", pCheck, const_cast<const ScConditionalFormat*>(pFormat)); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:230:32: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL_MESSAGE' > (actual), \ > ~^~~~~~~ > 1 error generated. > make[1]: *** [solenv/gbuild/LinkTarget.mk:270: workdir/CxxObject/sc/qa/unit/ucalc_condformat.o] Error 1 Change-Id: If2e8577bad4ec7454d584eb59106734d47f876ad
2017-02-16loplugin:redundantcast: Avoid double warnings on some const_castStephan Bergmann
Change-Id: I1e6140fef55054899dd32465726e804fc6006394
2017-02-16Capture loplugin:redundantcast status-quo wrt const_castStephan Bergmann
...including some double-warnings that'll get cleaned up shortly Change-Id: I14e9796f2846a6bb61e4c93dfb23cba6488ea2e6
2017-02-16convert EESpellState to scoped enumNoel Grandin
and drop unused EE_SPELL_NOLANGUAGE enumerator Change-Id: I74a5f89335883a13d77b39f78b7de55bddb1f107
2017-02-16remove unused NONE from ScrollRangeCheck enumNoel Grandin
Change-Id: I9d83cc38a9fa477a61ec7e2ec3d9786318187085
2017-02-16convert resetType to scoped enumNoel Grandin
Change-Id: Ie127b99949546b5303fd105c662b25c62d409941
2017-02-16convert HelpProcessingErrorClass to scoped enumNoel Grandin
and drop unused HELPPROCESSING_INTERNAL_ERROR enumerator Change-Id: I0f2cf063a3f1472e1d52bab5039b1c3158d4865e
2017-02-16remove unused enumerators from SymbolType enumNoel Grandin
Change-Id: I63af4ab93dfd021f88f03fad2c065f5a0e9eeed9
2017-02-16remove unused Exist from oslCheckMode enumNoel Grandin
Change-Id: I1ad187342444c5e92b61578d2a67cce2ae5ac428
2017-02-15convert FuncParamValidity to scoped enumNoel Grandin
and drop unused NONE enumerator Change-Id: Ibc77390efb195a9158ba809ad96aab4dcdbc09cb
2017-02-15convert SylkVersion to scoped enumNoel Grandin
Change-Id: Ib7e02fee748bd55be6d74d60bff3d8ed765ea225
2017-02-15convert DoubledQuoteMode to scoped enumNoel Grandin
and drop unused enumerators Change-Id: I0dc45e2bec1a25357405ca0c0197632ee4806cb0
2017-02-15drop unused PRESOBJ_IMAGENoel Grandin
Change-Id: I8fa011bea423e961a3ebe7cd8687e4bce7c4cd77
2017-02-15drop unused SwChildWindowMailmerge from SfxShellFeature enumNoel Grandin
Change-Id: Ica64d75986877bc0b2fc3bafb092457396fb8e27
2017-02-15convert SmBracketType to scoped enumNoel Grandin
and drop unused enumerators Change-Id: Icda3ff510331f9f0adb97d6dac56edf325d0d1a7