diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-15 16:45:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-15 22:24:03 +0200 |
commit | 033ecf0127b0e232c45e727988c6d446c7ea5964 (patch) | |
tree | 12cd5ad627d5ed27be11c75d117736e4dbc3bc08 /compilerplugins/clang/test/stringadd.cxx | |
parent | 4a983f3b2ff9a9cbc593ae8a69e744f4bbf5df11 (diff) |
Improve loplugin:stringadd diagnostics
Change-Id: I8b87c4e56f10417acd538b765b3f8e4cc6e12fb9
Reviewed-on: https://gerrit.libreoffice.org/80844
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test/stringadd.cxx')
-rw-r--r-- | compilerplugins/clang/test/stringadd.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/test/stringadd.cxx b/compilerplugins/clang/test/stringadd.cxx index fc06e5e33b5c..c4fe15b16d68 100644 --- a/compilerplugins/clang/test/stringadd.cxx +++ b/compilerplugins/clang/test/stringadd.cxx @@ -163,9 +163,9 @@ void f1(OUString s, OUString t, int i, const char* pChar) { // no warning expected t = t + "xxx"; - // expected-error@+1 {{avoid constructing temporary object from 'const char [4]' during + [loplugin:stringadd]}} + // expected-error@+1 {{avoid constructing 'rtl::OUString' from 'const char [4]' on RHS of + (where LHS is of type 'rtl::OUString') [loplugin:stringadd]}} s = s + OUString("xxx"); - // expected-error@+1 {{avoid constructing temporary object from 'const rtl::OUString' during + [loplugin:stringadd]}} + // expected-error@+1 {{avoid constructing 'rtl::OUString' from 'const rtl::OUString' on RHS of + (where LHS is of type 'rtl::OUString') [loplugin:stringadd]}} s = s + OUString(getByRef()); // no warning expected @@ -183,7 +183,7 @@ void f1(OUString s, OUString t, int i, const char* pChar) void f2(char ch) { OString s; - // expected-error@+1 {{avoid constructing temporary object from 'const char [4]' during + [loplugin:stringadd]}} + // expected-error@+1 {{avoid constructing 'rtl::OString' from 'const char [4]' on RHS of + (where LHS is of type 'rtl::OString') [loplugin:stringadd]}} s = s + OString("xxx"); // no warning expected, no OStringLiteral1 s = s + OString(ch); |