From 84cd2e5a712f68062429d369cc5a196f7070fd41 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 26 Feb 2025 08:20:55 +0200 Subject: loplugin:simplifyconstruct improve warning message which was needlessly cryptic Change-Id: Ifb91631705accff3f49ec3f55b67e83532d70a12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182199 Reviewed-by: Noel Grandin Tested-by: Jenkins --- compilerplugins/clang/simplifyconstruct.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compilerplugins/clang/simplifyconstruct.cxx') diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx index d9eff0b3af89..8c67abe6806f 100644 --- a/compilerplugins/clang/simplifyconstruct.cxx +++ b/compilerplugins/clang/simplifyconstruct.cxx @@ -96,7 +96,8 @@ bool SimplifyConstruct::VisitVarDecl(VarDecl const* varDecl) if (compiler.getSourceManager().isMacroBodyExpansion(init->getBeginLoc())) return true; - report(DiagnosticsEngine::Warning, "simplify", varDecl->getLocation()) + report(DiagnosticsEngine::Warning, "simplify construction, just use 'Foo a(...);'", + varDecl->getLocation()) << varDecl->getSourceRange(); return true; -- cgit