diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-06 14:22:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-06 13:03:06 +0000 |
commit | 6768a9b602c5cd6b4702faf862cac60527bded99 (patch) | |
tree | fa7048ac03cd0c9bd00949e2ce236980ccaf3efd /compilerplugins | |
parent | ad16351d9d8fd440bb8941c453b802ad5c109b23 (diff) |
loplugin:redundantcast check for c-style casts to void
Change-Id: Ic8b99f590436f94825e471bc61411c69fd768862
Reviewed-on: https://gerrit.libreoffice.org/36208
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/redundantcast.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx index 59e21657f548..e157e05668bd 100644 --- a/compilerplugins/clang/redundantcast.cxx +++ b/compilerplugins/clang/redundantcast.cxx @@ -307,7 +307,8 @@ bool RedundantCast::VisitCStyleCastExpr(CStyleCastExpr const * expr) { return true; } bool bBuiltinType = t1->isSpecificBuiltinType(BuiltinType::Bool) || t1->isSpecificBuiltinType(BuiltinType::Double) - || t1->isSpecificBuiltinType(BuiltinType::Float); + || t1->isSpecificBuiltinType(BuiltinType::Float) + || t1->isSpecificBuiltinType(BuiltinType::Void); if ((bBuiltinType || loplugin::TypeCheck(t1).Typedef()) && t1 == t2) { // Ignore FD_ISSET expanding to "...(SOCKET)(fd)..." in some Microsoft |