diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-06 13:33:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-06 15:18:15 +0100 |
commit | 0269fb72e886f0f04652fdadeaedf653f518ca61 (patch) | |
tree | 691e42a4f6df48352cdf0bd28da94841f8ebdc73 /compilerplugins/clang/test/rangedforcopy.cxx | |
parent | 2796d979fad388b32c466b8fb6d3dce8b5bdf31d (diff) |
ignore TypedWhichId in loplugin:rangedforcopy
where using a "&" in a for loop is overkill
Change-Id: Ic0d14f6d19c50b49cf7ce3bf2166d546a4d2685b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176130
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'compilerplugins/clang/test/rangedforcopy.cxx')
-rw-r--r-- | compilerplugins/clang/test/rangedforcopy.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/rangedforcopy.cxx b/compilerplugins/clang/test/rangedforcopy.cxx index e9a836e2489c..d83090d0a1d1 100644 --- a/compilerplugins/clang/test/rangedforcopy.cxx +++ b/compilerplugins/clang/test/rangedforcopy.cxx @@ -8,6 +8,7 @@ */ #include <vector> +#include <svl/typedwhich.hxx> struct S { @@ -37,4 +38,13 @@ void f(std::vector<bool> const& v) } } +// no warning expected +class SvxFontItem; +constexpr TypedWhichId<SvxFontItem> EE_CHAR_FONTINFO1(12); +constexpr TypedWhichId<SvxFontItem> EE_CHAR_FONTINFO2(13); +void f2() +{ + for (auto nWhich : { EE_CHAR_FONTINFO1, EE_CHAR_FONTINFO2 }) + (void)nWhich; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |