From 4450b2a16677431b1b9dfaa28d0b9af9e51ebdec Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 2 Apr 2018 08:58:19 +0200 Subject: pass area param to DBG_UNHANDLED_EXCEPTION and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/sallogareas.cxx | 2 -- compilerplugins/clang/test/sallogareas.cxx | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'compilerplugins/clang') diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx index 1095302d9ada..e31754493523 100644 --- a/compilerplugins/clang/sallogareas.cxx +++ b/compilerplugins/clang/sallogareas.cxx @@ -93,8 +93,6 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call ) area->getLocStart()); return true; } - if( kind == LogCallKind::DbgUnhandledException ) // below checks don't apply - return true; 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. diff --git a/compilerplugins/clang/test/sallogareas.cxx b/compilerplugins/clang/test/sallogareas.cxx index 6a9035a05f30..eb3f1a70fa2f 100644 --- a/compilerplugins/clang/test/sallogareas.cxx +++ b/compilerplugins/clang/test/sallogareas.cxx @@ -51,7 +51,7 @@ int main() } catch (std::exception const&) { - DBG_UNHANDLED_EXCEPTION(); + DBG_UNHANDLED_EXCEPTION(); // expected-error {{missing log area [loplugin:sallogareas]}} } } -- cgit v1.2.3