summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2017-07-20loplugin:unusedfields in writerfilterNoel Grandin1-12/+0
Change-Id: I7831da8cccfa730c8615ef770d0add95cbde396b Reviewed-on: https://gerrit.libreoffice.org/40215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:unusedfields in toolsNoel Grandin1-2/+0
Change-Id: I4e26c4750f6ff6c246a25507cfed1a0b4e3c6b81 Reviewed-on: https://gerrit.libreoffice.org/40225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20remove some "optimisation" insanity in ScriptEventContainerNoel Grandin1-2/+0
I can only imagine the weird bugs that must have periodically resulted when we had a hash value collision. In the process, fix hasElements() to return a useful value Change-Id: I1d9a052e73332b4b2bbc9c1fd8142c13eb22f1be Reviewed-on: https://gerrit.libreoffice.org/40226 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:unusedfields in vclNoel Grandin1-26/+0
Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6 Reviewed-on: https://gerrit.libreoffice.org/40217 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:constparams in basicNoel Grandin1-0/+4
Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60 Reviewed-on: https://gerrit.libreoffice.org/40214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20mxStatusIndicator is unusedNoel Grandin1-2/+0
ever since commit 8dc268058690337459bc38862c1532c34f171a48 Author: Björn Milcke <bm@openoffice.org> Date: Fri Feb 9 15:48:29 2001 +0000 Req. change Load/SaveAs for XML format - removed deprecated CTOR Change-Id: I772123e89391fea3578c7ed0986e1bc2d2a42a97
2017-07-20mxStatusIndicator is unusedNoel Grandin1-2/+0
ever since commit eaefa688bfff0f73992c84496d4ce89e16ac3550 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Nov 2 22:33:34 2011 +0000 callcatcher: ditch some unused code Change-Id: Ifca9734ad29257d0d692cf36e709837cbe02af29
2017-07-20m_xExtHandler is unusedNoel Grandin1-2/+0
ever since it was added in commit eb4b36c6e797e5eda511422c48ff0a210e2cc460 Date: Tue Jul 13 08:00:42 2004 +0000 INTEGRATION: CWS oasis (1.1.2); FILE ADDED Change-Id: If4375c6e57dbe635f53ca0395cb7bdc02de81b18
2017-07-19loplugin:constparams in connectivityNoel Grandin1-0/+2
Change-Id: I9b81c6227fb3c89a832640058a11444f72019694 Reviewed-on: https://gerrit.libreoffice.org/40155 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19loplugin:constparams in desktopNoel Grandin1-0/+1
Change-Id: Idba3acbd1e6ad5e1ce1cae9f80f764906ab8b143 Reviewed-on: https://gerrit.libreoffice.org/40157 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19enhance unusedfields plugin to find readonly fieldsNoel Grandin6-49/+2482
Change-Id: I4da97443fc7eb14fd94959a026ab45a9256c055f Reviewed-on: https://gerrit.libreoffice.org/40158 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18remove unused CntWallpaperItemCaolán McNamara1-4/+0
Change-Id: I47cf9fc37bb64a80a21ed805bff2bb3ac3eb6da5 Reviewed-on: https://gerrit.libreoffice.org/40148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-18loplugin:constparams in sdextNoel Grandin1-4/+9
Change-Id: Ia5d2c00b02bf1758f7502065dd109f0f54fda2d3 Reviewed-on: https://gerrit.libreoffice.org/40124 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in toolkit,ucb,xmlhelpNoel Grandin1-0/+2
Change-Id: I2287bf468aae5008e25aa8b1bc0b63cff7bb1bf1 Reviewed-on: https://gerrit.libreoffice.org/40117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in vclNoel Grandin1-47/+56
Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4 Reviewed-on: https://gerrit.libreoffice.org/40116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17Fix typosAndrea Gelmini1-2/+2
Change-Id: I9d2c641b485c32ddccf0bfaaed1d0796572d1d33 Reviewed-on: https://gerrit.libreoffice.org/39477 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-17Fix test for clang-clStephan Bergmann1-0/+1
...whatever it is that causes clang-cl to not analyze the template code otherwise Change-Id: Id4da996714fe93c454abb3669a12d8afe27b918b
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin1-1/+5
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-16lopgluin:unnecessaryparen: Properly treat parenthesized sub-expr in sizeof (x)Stephan Bergmann1-4/+11
...where redundant parentheses are probably common enough to not warn about them Change-Id: Ia88097f5d3433e03337d6d42a144abfe210733c2
2017-07-14remove some dead code from unusedfields pluginNoel Grandin2-9/+0
Change-Id: I268b32270a17c0c3fcf8236c3e0eebac9a57cb5d
2017-07-14extend loplugin useuniqueptr to POD typesNoel Grandin2-9/+12
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14loplugin:oncevar: empty stringsStephan Bergmann3-79/+158
...which showed that checking the parent statement (which may be too large to) in OnceVar::VisitDeclRefExpr is inadequate. Change-Id: I07fb8ba9e2dfbd0c65a2723737d14abcddcefec4 Reviewed-on: https://gerrit.libreoffice.org/39757 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-13improve useuniqueptr loplugin to find arraysNoel Grandin2-22/+108
Change-Id: I81e9d0cd4f430b11d20037054055683240792240 Reviewed-on: https://gerrit.libreoffice.org/39825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13Use isSamePathname for full-pathname comparisonsStephan Bergmann1-5/+5
Change-Id: Iccc20f441aceae7c6bcdf3a24d2a42ec9be8bb8f
2017-07-13loplugin:oncevar for value-dependent constant expressionsStephan Bergmann3-16/+63
(Where the change to basic/source/comp/codegen.cxx reveals that loplugin:loopvartoosmall also needs the Clang < 3.9 workaround from 33ee8e61292af05627f5f72ea2f93ad80e715e46 "Work around bug in Clang 3.8".) Change-Id: I9f23b9648bc11ca4136a0fbdd332570ba70ee77c Reviewed-on: https://gerrit.libreoffice.org/39667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-12borderline: correct problems with border displayArmin Le Grand1-1/+0
Borderline display with direct paint and with primitive direct paint has quite some errors in the current state. Started to unify usages, check deeper with creation/usage. borderline: deep changes to BorderLine Found basic error in determining the offset values for BorderLinePrimitive creation, these were not centered on the lines. Corrected that. This makes it possible to remove the formally used clipping which seems to have been used to correct that. Also allows to go back to a 'normal' decomposition that creates line primitives as expected. That again can then be painted quite normally. Also added view-dependent case to the decomposition to guarantee a gap of one discrete unit (pixel). Removed the direct painter, too. Checked and corrected stroking. borderline: Adapted previews to primitives Added code to use the primitive representation in all dialogs and apps using tables. The edit views use these mostly, so the preview should do that, too. Currently missing is a good visualization of diagonals, but this is also true for edit views. Checked all apps and table usages to not get worse borderline: correct line dash visualization When a dashed line is used, a factor of 10.0 was applied in the original coded, added that. Also the orientation of vertical borders was inverted since it was simpler to exchange Start/End, but this also mirrors the line dash visualisation, corrected that Change-Id: I4c1b380a76cb37389fab1259a53fb7cc9da982d1 e95e246d5563360617a2a2213e4d5ec7d0e736b9 62369b4de58fb0264aeb710ec6983ceddca5701d 77418cc6c84ebb0632f8c3448976e82ce612d6b6 b4eb28dc86ce05eb89b26517167305b994158ef8 borderline: adapt cppunittest and clang
2017-07-11unusedfields plugin needs to ignore fields that have reinterpret_cast on themNoel Grandin1-1/+7
Change-Id: Ie8570de6a4eafc95352899fbfd1447d7c3a84e1a
2017-07-10Only consider calls on const member functions as consumptionsStephan Bergmann1-6/+31
Change-Id: I968614ba25affe58ea05c97c97dd10912359df2c Reviewed-on: https://gerrit.libreoffice.org/39755 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin2-0/+67
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin2-1/+32
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06loplugin:unusedfields in scNoel Grandin4-461/+66
found a couple more by running make build-nocheck to exclude testing code Also, teach unusedfields loplugin about operator<<, since referring to a field in an ostream operator<< does not indicate a real use, it's normally for debugging Change-Id: I3dce22bf5afda2fd09e01de9bf1d0ef85e535aa8 Reviewed-on: https://gerrit.libreoffice.org/39625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06teach unnecessaryparen plugin about other kinds of statementsNoel Grandin2-10/+48
i.e. do / while / switch Change-Id: Id0985015cc425557f9984734701d56466f8a6088 Reviewed-on: https://gerrit.libreoffice.org/39601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin1-2/+9
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin2-0/+104
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:unusedfields variousNoel Grandin3-1789/+36
Change-Id: Ia7bcf2471381aa6a2768ea795fe6572e38209100
2017-07-05loplugin:unusedfields connectivityNoel Grandin1-44/+0
Change-Id: I056b36249803982e451b887cc73b49a851144b7e Reviewed-on: https://gerrit.libreoffice.org/39498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfields in cui..idlNoel Grandin1-20/+0
Change-Id: Icb393cc0b2f79ded154e186ab6975b95e5126903 Reviewed-on: https://gerrit.libreoffice.org/39496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04typo in commentStephan Bergmann1-2/+2
Change-Id: I816f2dad87d798296e60a5eb8842a147f504b90b
2017-07-04loplugin:unusedfields in editengNoel Grandin1-32/+0
Change-Id: I9806d87028a11a8103c35004c87b5098ca591409 Reviewed-on: https://gerrit.libreoffice.org/39495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfields l10ntools..rscNoel Grandin1-8/+0
Change-Id: I78785eeab436910c9e8733924a7c43fa998ba36f Reviewed-on: https://gerrit.libreoffice.org/39491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfields in formulaNoel Grandin1-12/+0
Change-Id: I5d8fe8869087efda68d040448b2d9e0e7e5611f6 Reviewed-on: https://gerrit.libreoffice.org/39493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfields in frameworkNoel Grandin1-10/+0
Change-Id: Ibb602e037bcee518c31dfe9734a5c5773cff23ab Reviewed-on: https://gerrit.libreoffice.org/39492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfields in sdNoel Grandin1-30/+0
Change-Id: I42def3dc21ae1a18e1c98d1aeeff4ed4425e941a Reviewed-on: https://gerrit.libreoffice.org/39479 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfields in sfx2Noel Grandin1-10/+0
Change-Id: I9f57545ca4ee5159a095f9b35267d298ccc7fb4e Reviewed-on: https://gerrit.libreoffice.org/39476 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfieldsNoel Grandin1-12/+0
Change-Id: I6bf3de7ba6e6bff2fd607156a0dcdd554887e491 Reviewed-on: https://gerrit.libreoffice.org/39475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:casttovoid: fix containsPreprocessingConditionalInclusion()Stephan Bergmann1-2/+15
...and re-enable plugin Change-Id: I0b42cfc0f0b45711e714e6661ae9dd39f05f8960
2017-07-03loplugin:unusedfields in slideshow..svtoolsNoel Grandin1-18/+0
Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c Reviewed-on: https://gerrit.libreoffice.org/39474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03Disable loplugin:casttovoid for nowStephan Bergmann1-1/+1
I'd accidentally developed it against a Clang built without LLVM_ENABLE_ASSERTIONS=ON, so only saw issues with containsPreprocessingConditionalInclusion() now. Change-Id: I5da6775a06de748e78b34a42f63b0543c3893124
2017-07-03loplugin:casttovoidStephan Bergmann6-73/+714
Change-Id: I427b15b35ef6e7c803cb8a00c961d35175ae8cb2
2017-07-03Work around bug in Clang 3.8Stephan Bergmann1-4/+20
...that causes > clang/lib/AST/Type.cpp:1878: bool clang::Type::isConstantSizeType() const: Assertion `!isDependentType() && "This doesn't make sense for dependent types"' failed. compilation failure in PCodeBufferWalker in basic/source/comp/codegen.cxx > static T readParam( sal_uInt8 const *& pCode ) > { > short nBytes = sizeof( T ); > T nOp1=0; > for ( int i=0; i<nBytes; ++i ) > nOp1 |= *pCode++ << ( i * 8); > return nOp1; > } with loplugin:oncevar. Change-Id: I25417076549ea538adf013282f3657e0d642d776