summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/constantparam.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-08-10Avoid -Werror=deprecated-declarations with recent Clang trunkStephan Bergmann1-2/+2
...which first added alternative names to and then deprecated getLocBegin/End Change-Id: Iaefb8ce259057abfa6cd20f0b63c0ef2949a96b2 Reviewed-on: https://gerrit.libreoffice.org/58820 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-06compilerplugins: try to make these work with icecreamMichael Stahl1-2/+1
There are some problems here, this should fix one of them: the getFilename function returns "<stdin>" for spelling locations, because the input to clang is sort of preprocessed via -frewrite-includes if icecream is used and the file is built on a remote host (whereas it's apparently not preprocessed if the file is compiled locally by icecream). Using getPresumedLoc() uses the #line directives in the preprocessed input, which avoids the problem but is more expensive, so try to use it only when necessary. The getFileEntry(getMainFileID())->getName() pattern will also result in "<stdin>", but fortunately icecream passes -main-file-name, which oddly enough isn't used by the SourceManager's spelling locations, but is available separately via CodeGenOptions. This builds everything successfully with clang version 6.0.0: ICECC_PREFERRED_HOST=myremote make check gb_SUPPRESS_TESTS=t Change-Id: Ic121511683e5302d7b9d85186c8b9c4a5443fa1b Reviewed-on: https://gerrit.libreoffice.org/54993 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-04-10put the loplugin output files in the workdirNoel Grandin1-1/+1
so that the next time I accidentally leave one turned on, and commit it, the buildbots will clean up naturally the next time they run 'make clean' Change-Id: Ia09dea9c272c322c7e2773c5458cb54aceb50dd1
2018-03-27Let prefix arguments to hasPathnamePrefix end in slashStephan Bergmann1-1/+1
...for better precision Change-Id: I5f273b7c66ba931647805c415622b5ac767ff987
2017-12-19Bump --enable-compiler-plugins to Clang 3.8.0Stephan Bergmann1-8/+1
<https://lists.freedesktop.org/archives/libreoffice/2017-December/079107.html> "Clang baseline bump" Change-Id: I18fca8794ea34118fc6308458064d0c28cf5caf7 Reviewed-on: https://gerrit.libreoffice.org/46557 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-07Clean away temporarily added using declarationsStephan Bergmann1-3/+3
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2017-10-27extract some common code for checking if a functions address was takenNoel Grandin1-18/+10
Change-Id: I292b4e9bf17c83f83ff43ac4c5870d33092d0c71
2017-10-27loplugin:constantparam was not always using canonical location for functionNoel Grandin1-5/+4
Change-Id: I8a15da534ba2cf9968cba0ee1f1bb74d7e3a0d54
2017-06-20reformat some loplugin codeNoel Grandin1-2/+2
to match our more normal conventions. Also drop the 'using std' and some other cruft Change-Id: I02ef81c5427188bc03a20b157a57a900a9d7bf0d
2017-05-18Adapt pathname checks to mixed usage of \ and / on WindowsStephan Bergmann1-3/+3
Change-Id: I91bc89a9076c6642e06b238f65f2d31a1d20c6b5
2017-05-10add some some empty string names to constantparam lopluginNoel Grandin1-1/+5
Change-Id: I8f67212271a798d544b7aad46f08890122cd5e18
2017-05-09make loplugin constantparam smarter about string paramsNoel Grandin1-3/+29
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294 Reviewed-on: https://gerrit.libreoffice.org/37426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08teach loplugin:constantparam about simple constructor callsNoel Grandin1-1/+21
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-11loplugin constantparam, ignore variadic methodsNoel Grandin1-0/+2
Change-Id: Ieabb020406d5a381dd9cbace3b1e4cc434857d54
2016-10-18loplugins: extract some common functionalityNoel Grandin1-1/+1
Change-Id: If470e1d9b481c9eda0829aa985152baf8fb46d7a
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-27clang plugins: do "dotdot" normalisationNoel Grandin1-0/+1
which fixes some false positives Change-Id: I555349180b5ca819f29695789f1545ba2177bd09 Reviewed-on: https://gerrit.libreoffice.org/29320 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14loplugin:constantparamNoel Grandin1-52/+35
clean up the plugin a little, and try to catch params which are default constructed, which doesn't seem to be working yet Change-Id: Ife45f18502a45cd26306424b7432c55fcbb0fd12 Reviewed-on: https://gerrit.libreoffice.org/28861 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-10loplugin:constantparam in sdNoel Grandin1-0/+2
Change-Id: I2bc989802c12b379a1ba4202f54ecfef1f339c8c Reviewed-on: https://gerrit.libreoffice.org/28774 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-06teach loplugin constantparam about default param valuesNoel Grandin1-25/+47
Change-Id: I334622bd34d8349f5b3988122d282b1062b225bb
2016-07-25loplugins: more consistent naming of output filesNoel Grandin1-2/+2
Change-Id: Ia26f697cb16078f235c94e4cff449a60c1bbd74e
2016-06-24Adpat to <https://llvm.org/svn/llvm-project/cfe/trunk@273647>Stephan Bergmann1-1/+1
"Use more ArrayRefs" Change-Id: Ied0ab11dd9366b3f499100b2627f4919cca52c9c
2016-06-23new loplugin: singlevalfieldsNoel Grandin1-2/+1
look for fields that only have a single constant value assigned to them Change-Id: Iafcd37fdb8a8119bbc00f92981a1a01badf9c5a2
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin1-9/+2
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16loplugin:constantparams in vcl/Noel Grandin1-32/+83
also some improvements to the plugin Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871 Reviewed-on: https://gerrit.libreoffice.org/23289 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-15loplugin:constantparamNoel Grandin1-2/+9
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
2016-03-08new loplugin:constantparamNoel Grandin1-0/+215
finds parameters that are only ever being called with a single value Change-Id: Ibd0c9b6e6dbc1d1b5d5a005eaa19959560a6e50f