summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/passstuffbyref.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/passstuffbyref.cxx')
-rw-r--r--compilerplugins/clang/test/passstuffbyref.cxx2
1 files changed, 2 insertions, 0 deletions
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; }