From 5fdfc074c93447f9eb1c9a351ee4690126ba782c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 5 Nov 2024 11:19:51 +0200 Subject: loplugin:passstuffbyref make some small improvements Change-Id: Ib14a2e6b41165887fcf99c3d155850faa8564822 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176218 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/test/passstuffbyref.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compilerplugins/clang/test') diff --git a/compilerplugins/clang/test/passstuffbyref.cxx b/compilerplugins/clang/test/passstuffbyref.cxx index d90d6f05ba9f..08d91aeb1521 100644 --- a/compilerplugins/clang/test/passstuffbyref.cxx +++ b/compilerplugins/clang/test/passstuffbyref.cxx @@ -45,6 +45,8 @@ struct S2 { OUString get11() const { return mxCow->get(); } // expected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}} OUString get12() { return child.get2(false); } // expected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}} + OUString get13() { return OUString(); } // expected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}} + // no warning expected OUString set1() { return OUString("xxx"); } OUString set2() { OUString v1("xxx"); return v1; } -- cgit