compilerplugins/clang/test/unoany.cxx | 4 ++-- compilerplugins/clang/unoany.cxx | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-)
New commits: commit d20d4420870b586a3e8233ab1d8640d39eb714aa Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Nov 23 10:44:34 2018 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Nov 23 14:39:44 2018 +0100 Improve wording of loplugin:unoany warnings ...which apparently caused confusion occasionally, cf. <https://gerrit.libreoffice.org/#/c/58687/5> "Unit test for 0853b05b1fabb231a7d57d811c5a06ee542d3295". Change-Id: I32f1137bcbb86ffa04bc1a6a58fc93ef69cb3022 Reviewed-on: https://gerrit.libreoffice.org/63874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/compilerplugins/clang/test/unoany.cxx b/compilerplugins/clang/test/unoany.cxx index 8c7ba7e90179..1b4bfaa2beec 100644 --- a/compilerplugins/clang/test/unoany.cxx +++ b/compilerplugins/clang/test/unoany.cxx @@ -19,8 +19,8 @@ int main() css::uno::Any b; a = b; a = getAny(); - a = css::uno::makeAny(true); // expected-error {{unnecessary copy, rather use <<= operator [loplugin:unoany]}} - a = css::uno::Any(true); // expected-error {{unnecessary copy, rather use <<= operator [loplugin:unoany]}} + a = css::uno::makeAny(true); // expected-error {{unnecessary copy, rather use <<= operator directly with the 'makeAny' argument [loplugin:unoany]}} + a = css::uno::Any(true); // expected-error {{unnecessary copy, rather use <<= operator directly with the 'Any' constructor argument [loplugin:unoany]}} } diff --git a/compilerplugins/clang/unoany.cxx b/compilerplugins/clang/unoany.cxx index 07b9da435752..7d10a2361878 100644 --- a/compilerplugins/clang/unoany.cxx +++ b/compilerplugins/clang/unoany.cxx @@ -48,7 +48,8 @@ bool UnoAny::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const * expr) Namespace("uno").Namespace("star").Namespace("sun").Namespace("com").GlobalNamespace()) { report( DiagnosticsEngine::Warning, - "unnecessary copy, rather use <<= operator", + ("unnecessary copy, rather use <<= operator directly with the 'makeAny'" + " argument"), expr->getOperatorLoc()) << expr->getSourceRange(); return true; @@ -59,7 +60,8 @@ bool UnoAny::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const * expr) //expr->getArg(1)->dump(); report( DiagnosticsEngine::Warning, - "unnecessary copy, rather use <<= operator", + ("unnecessary copy, rather use <<= operator directly with the 'Any' constructor" + " argument"), expr->getOperatorLoc()) << expr->getSourceRange(); return true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits