Commit Graph

6 Commits

Author SHA1 Message Date
Stephan Bergmann
14184060bd Don't warn about multiplication by zero in loplugin:expressionalwayszero
That specific warning (added with 862dc17e43
"loplugin:expressionalwayszero improvements", together with other improvements)
already looked somewhat unhelpful to me in
4cb78942f2 "loplugin:expressionalwayszero
(clang-cl)", but now started to generate

> [CXX] vcl/source/bitmap/BitmapSobelGreyFilter.cxx
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:92:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum1 += nMask121 * nGrey12;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:99:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum2 += nMask212 * nGrey21;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:101:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum1 += nMask221 * nGrey22;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:102:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum2 += nMask222 * nGrey22;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:105:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum2 += nMask232 * nGrey23;
>                                  ^~~~~~~~~~~~~~~~~~
> /data/sbergman/lo-clang2/core/vcl/source/bitmap/BitmapSobelGreyFilter.cxx:110:34: error: expression always evaluates to zero, lhs=0 rhs=unknown [loplugin:expressionalwayszero]
>                         nSum1 += nMask321 * nGrey32;
>                                  ^~~~~~~~~~~~~~~~~~
> 6 errors generated.

(where all those nMask* are zero constants; and which even passed Gerrit/Jenkins
as loplugin:expressionalwayszero is only active for Clang >= 3.9).  Lets just
remove that specific check again.

Change-Id: Ia8710f83b16d6e6949439d3941e17b8a0959aa8b
2018-04-23 09:24:53 +02:00
Noel Grandin
c6bc9f71fb disable expressionalwayszero loplugin on clang-3.8
can generate OOM

Change-Id: Ie9fbed147687c06727a702616764a18d91b38e9c
Reviewed-on: https://gerrit.libreoffice.org/52052
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 09:31:42 +02:00
Noel Grandin
862dc17e43 loplugin:expressionalwayszero improvements
Change-Id: I00bdbc58d2295a0be30b47c85eae6b9abfec17b2
Reviewed-on: https://gerrit.libreoffice.org/51868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-27 08:22:09 +02:00
Stephan Bergmann
b35bb38f18 Clean away temporarily added using declarations
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2017-11-07 11:50:47 +01:00
Noel Grandin
84c0687f09 don't use boost in compilerplugins
Change-Id: Ic1610e99cd2d11d1a536a6f3e66b44417ee59793
2017-08-18 15:08:33 +02:00
Noel Grandin
256c28ae33 new loplugin:expressionalwayszero
The code in SvXMLExportItemMapper::exportXML was broken as far back as
its introduction in

    commit 0c28e3c480
    "Move SvXMLAttrContainerItem to SVX, moved writer only code to sw"

Change-Id: I90043ce8b7263aa56fd0883d350e29b97eeaf99b
Reviewed-on: https://gerrit.libreoffice.org/41282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18 14:19:20 +02:00