summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-09 22:42:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-09 23:31:17 +0100
commitdf810a82058a07dd8b1c2268955d64328e53cf97 (patch)
tree060003d876f4aad232475144e1df1ca65d7cc7c5 /compilerplugins/clang/test
parentff8d82dc4cc0841f11ad6d51d3ed37450a6f6971 (diff)
Fix loplugin:stringviewparam handling of comparison operators
Change-Id: I58456efb9588b544d998ac6a4c27d55457280742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107510 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test')
-rw-r--r--compilerplugins/clang/test/stringviewparam.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/compilerplugins/clang/test/stringviewparam.cxx b/compilerplugins/clang/test/stringviewparam.cxx
index a9269dff3891..56fadbea71cf 100644
--- a/compilerplugins/clang/test/stringviewparam.cxx
+++ b/compilerplugins/clang/test/stringviewparam.cxx
@@ -50,8 +50,14 @@ template <> void f5<OUString>(OUString const&) {}
void f6([[maybe_unused]] OUString const&) {}
-// expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
-bool f7(const OUString& p1, OUString p2) { return p1 == p2; }
+bool f7(
+ // expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
+ const OUString& p1,
+ // expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
+ const OUString& p2)
+{
+ return p1 == p2;
+}
// expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
bool f8(const OUString& p1, std::u16string_view p2) { return p1 == p2; }