compilerplugins/clang/sallogareas.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 4f762202f647976ffd80c23bacada8401d633001 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Feb 28 23:12:48 2017 +0100 Adapt loplugin:sallogareas ...to b6a69585b00867005820c1dd94e10e0e6b545e2a "old sal_detail_log_backtrace into sal_detail_log" and follow-up c697ae306cd4eaa8144ed93fc908e50d5934e249 "Some clean up" Change-Id: Ie38899e70c5b326724f9442fbf92e453b05eec01 diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx index bde3513..e6c2997 100644 --- a/compilerplugins/clang/sallogareas.cxx +++ b/compilerplugins/clang/sallogareas.cxx @@ -51,7 +51,7 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call ) return true; if( const FunctionDecl* func = call->getDirectCallee()) { - if( func->getNumParams() == 4 && func->getIdentifier() != NULL + if( func->getNumParams() == 5 && func->getIdentifier() != NULL && ( func->getName() == "sal_detail_log" || func->getName() == "log" )) { auto tc = loplugin::DeclCheck(func); @@ -73,8 +73,9 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call ) area->getLocStart()); return true; } - if( loplugin::DeclCheck(inFunction).Function("log").Namespace("detail").Namespace("sal").GlobalNamespace() ) - return true; // This function only forwards to sal_detail_log, so ok. + if( loplugin::DeclCheck(inFunction).Function("log").Namespace("detail").Namespace("sal").GlobalNamespace() + || loplugin::DeclCheck(inFunction).Function("sal_detail_logFormat").GlobalNamespace() ) + return true; // These functions only forward to sal_detail_log, so ok. if( call->getArg( 1 )->isNullPointerConstant( compiler.getASTContext(), Expr::NPC_ValueDependentIsNotNull ) != Expr::NPCK_NotNull ) { // If the area argument is a null pointer, that is allowed only for SAL_DEBUG. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits