summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 14:22:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 13:03:06 +0000
commit6768a9b602c5cd6b4702faf862cac60527bded99 (patch)
treefa7048ac03cd0c9bd00949e2ce236980ccaf3efd /compilerplugins
parentad16351d9d8fd440bb8941c453b802ad5c109b23 (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.cxx3
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