diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-22 15:55:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 08:50:31 +0200 |
commit | 2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch) | |
tree | 82555c2aac7ca37c30e1084a7a8069c71fc11fbc /compilerplugins/clang/test/cppunitassertequals.cxx | |
parent | 61ff1d919e317947c769e61eeda7f1bb8132f273 (diff) |
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/test/cppunitassertequals.cxx')
-rw-r--r-- | compilerplugins/clang/test/cppunitassertequals.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/test/cppunitassertequals.cxx b/compilerplugins/clang/test/cppunitassertequals.cxx index 239de58853b3..f0b03fa7ffb4 100644 --- a/compilerplugins/clang/test/cppunitassertequals.cxx +++ b/compilerplugins/clang/test/cppunitassertequals.cxx @@ -48,9 +48,9 @@ void test(bool b1, bool b2, OUString const & s1, OUString const & s2, T t) { CPPUNIT_ASSERT(t.operator ==(t)); // There might even be good reasons(?) not to warn inside explicit casts: - CPPUNIT_ASSERT(bool(b1 && b2)); - CPPUNIT_ASSERT(bool(b1 == b2)); - CPPUNIT_ASSERT(bool(s1 == s2)); + CPPUNIT_ASSERT(bool(b1 && b2)); // expected-error {{redundant functional cast from/to 'bool' [loplugin:redundantcast]}} + CPPUNIT_ASSERT(bool(b1 == b2)); // expected-error {{redundant functional cast from/to 'bool' [loplugin:redundantcast]}} + CPPUNIT_ASSERT(bool(s1 == s2)); // expected-error {{redundant functional cast from/to 'bool' [loplugin:redundantcast]}} } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |