compilerplugins/clang/literaltoboolconversion.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit c03a2a0b1b78428d9c44519c5e2bf3c1dde78425 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jan 29 11:15:32 2014 +0100 Further fix for old Clang versions ...maybe this needs adaption for 3.3 or 3.4 too, known to work with trunk towards 3.5. Change-Id: I9f05ae44e4a49ae51df69d5a3c1df5eb371a1c87 diff --git a/compilerplugins/clang/literaltoboolconversion.cxx b/compilerplugins/clang/literaltoboolconversion.cxx index 1ede8b5..5c61647 100644 --- a/compilerplugins/clang/literaltoboolconversion.cxx +++ b/compilerplugins/clang/literaltoboolconversion.cxx @@ -114,6 +114,14 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr( << expr->getCastKindName() << expr->getSubExpr()->getType() << expr->getType() << expr->getSourceRange(); } +// At least Clang 3.2 would erroneously warn about Cache::add +// (binaryurp/source/cache.hxx:53) +// +// if( !size_) { +// +// as "implicit conversion (IntegralToBoolean) of null pointer constant of type +// 'std::size_t' (aka 'unsigned long') to 'bool'": +#if (__clang_major__ == 3 && __clang_minor__ >= 3) || __clang_major__ > 3 } else if (sub->isNullPointerConstant( compiler.getASTContext(), Expr::NPC_ValueDependentIsNull) != Expr::NPCK_NotNull) @@ -125,6 +133,7 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr( expr->getLocStart()) << expr->getCastKindName() << expr->getSubExpr()->getType() << expr->getType() << expr->getSourceRange(); +#endif } else if (sub->isIntegerConstantExpr(compiler.getASTContext())) { report( DiagnosticsEngine::Warning, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits