From 7662e92c64ec194a2089f633a363d9dc45a4aa9d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Apr 2017 08:59:07 +0200 Subject: loplugin:redundantcast find cstyle double casts Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/redundantcast.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx index 7b3b05d8aced..845876425c7e 100644 --- a/compilerplugins/clang/redundantcast.cxx +++ b/compilerplugins/clang/redundantcast.cxx @@ -306,8 +306,8 @@ bool RedundantCast::VisitCStyleCastExpr(CStyleCastExpr const * expr) { << t1 << t2 << expr->getSourceRange(); return true; } - bool bBuiltinTypeBool = t1->isSpecificBuiltinType(BuiltinType::Bool); - if ((bBuiltinTypeBool || loplugin::TypeCheck(t1).Typedef()) && t1 == t2) + bool bBuiltinType = t1->isSpecificBuiltinType(BuiltinType::Bool) || t1->isSpecificBuiltinType(BuiltinType::Double); + if ((bBuiltinType || loplugin::TypeCheck(t1).Typedef()) && t1 == t2) { // Ignore FD_ISSET expanding to "...(SOCKET)(fd)..." in some Microsoft // winsock2.h (TODO: improve heuristic of determining that the whole -- cgit