summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/simplifybool.cxx
AgeCommit message (Collapse)Author
2019-02-27Fix apparent temporary debugging leftoverStephan Bergmann
Change-Id: I3277a341137b1b404ad9839431b5cc39a88fcbe1 Reviewed-on: https://gerrit.libreoffice.org/68425 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27loplugin:simplifybool improve search for negated operatorNoel Grandin
Change-Id: Id6ac35fefa5c3e1f64c222713791e849b3cb4d34 Reviewed-on: https://gerrit.libreoffice.org/68379 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18Make findOperator more precise wrt acceptable parameter typesStephan Bergmann
Change-Id: I0a1ea253d999c9444344188d764134e83ae0c495 Reviewed-on: https://gerrit.libreoffice.org/67959 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18Tell about presumed corresponding negated operatorStephan Bergmann
Change-Id: Ic7ed64ecc4902853dc7431294484abb74e8da65b Reviewed-on: https://gerrit.libreoffice.org/67953 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18loplugin:simplifybool, check for !(!a op !b)Noel Grandin
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15loplugin:simplifybool extend to !(a == b) where comparison an overloaded opNoel Grandin
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14filter out some of the AST in the pluginsNoel Grandin
by checking if the current namespace decl is in our code, so we have to scan less stuff, which results in a 10% perf improvement for me Change-Id: Idf0e30d57b6d0dcd13daa9ed679c28b9d233d387 Reviewed-on: https://gerrit.libreoffice.org/58942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-10Avoid -Werror=deprecated-declarations with recent Clang trunkStephan Bergmann
...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>
2017-11-23loplugin:simplifybool can't invert conditions involving float typesNoel Grandin
so revert some of the changes from commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e loplugin:simplifybool for negation of comparison operator Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe Reviewed-on: https://gerrit.libreoffice.org/45130 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23Make not warning about !! in loplugin:simplifybool consistentStephan Bergmann
...so that 640e03da110d76b2c7d5ed5b8b8ba3b4367865ba "loplugin:simplifybool re- activate the !! warning", which did not warn about !!( nAttribs & ucb::ContentInfoAttribute::KIND_FOLDER ) in ucb/source/core/ucbcmds.cxx (involving sal_Int32 and sal_Int16), would not have warned about !!(nMode & nUpdateMode) in sfx2/source/appl/workwin.cxx (ivolving o3tl::typed_flags<SfxVisibilityFlags>) either. Change-Id: Ibe955592951a04b1bd9a9b4e8cc502024bc1d460 Reviewed-on: https://gerrit.libreoffice.org/45083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22loplugin:simplifybool re-activate the !! warningNoel Grandin
Change-Id: Iac7d82a1c228734177be536e9a6c41803c03637b Reviewed-on: https://gerrit.libreoffice.org/45035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-07Clean away temporarily added using declarationsStephan Bergmann
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2015-09-30Fix typosAndrea Gelmini
Change-Id: Iaff7e38dd5beac48e1643e369e4240aa736c35ea Reviewed-on: https://gerrit.libreoffice.org/18941 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-04-27loplugin:simplifybool: Need to ignore imp. casts when determining literalsStephan Bergmann
Change-Id: I6b25ef369a9d445322f7500630a6a4ed38ae7d8f
2015-04-24Add clarifying commentStephan Bergmann
Change-Id: Ie891404a4d21e1917e5e653737e35257df3dfcae
2015-04-24loplugin:simplifyboolStephan Bergmann
Change-Id: I44b563269a68cd2d57a906e10939ac290a0a2ebd