diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-03-23 10:35:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-03-23 10:51:14 +0000 |
commit | fe3234718539ef65e384f1393cfd859cb81b8233 (patch) | |
tree | ecf94e784ffde42fcce6b29b538b1881c7515d64 /compilerplugins/clang/test | |
parent | 71311f88f7d83d8669576a98d300780d3d8bd02a (diff) |
loplugin:stringview: Constructing O[U]String from O[U]StringLiteral is cheap
...so don't warn about those, as requested in the comment at
<https://gerrit.libreoffice.org/c/core/+/149254/8#message-6430dc5397ab7b60bf4e78e6856b44ab6cd72c97>
"tdf#154319: fix TOC field codes parsing"
Change-Id: I25989cd4b42bc3fe9062a8a0d6896d32a18635d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149417
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test')
-rw-r--r-- | compilerplugins/clang/test/stringview.cxx | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compilerplugins/clang/test/stringview.cxx b/compilerplugins/clang/test/stringview.cxx index 2ba87c13c31d..f1a63a058bdf 100644 --- a/compilerplugins/clang/test/stringview.cxx +++ b/compilerplugins/clang/test/stringview.cxx @@ -161,7 +161,6 @@ void f5(char const* s1, sal_Int32 n1, char16_t const* s2, sal_Int32 n2, OString // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'const char *', pass a 'std::string_view' [loplugin:stringview]}} call_view(OString(s1, n1)); constexpr OStringLiteral l1("foo"); - // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'const {{(rtl::)?}}OStringLiteral<4>'{{( \(aka 'const rtl::OStringLiteral<4>'\))?}}, pass a 'std::string_view' [loplugin:stringview]}} call_view(OString(l1)); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'std::string_view' (aka 'basic_string_view<char>'), pass a 'std::string_view' [loplugin:stringview]}} call_view(OString(std::string_view("foo"))); @@ -186,7 +185,6 @@ void f5(char const* s1, sal_Int32 n1, char16_t const* s2, sal_Int32 n2, OString // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char16_t *', pass a 'std::u16string_view' (or an 'rtl::OUStringChar') [loplugin:stringview]}} call_view(OUString(s2, 1)); constexpr OUStringLiteral l2(u"foo"); - // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const {{(rtl::)?}}OUStringLiteral<4>'{{( \(aka 'const rtl::OUStringLiteral<4>'\))?}}, pass a 'std::u16string_view' [loplugin:stringview]}} call_view(OUString(l2)); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'std::u16string_view' (aka 'basic_string_view<char16_t>'), pass a 'std::u16string_view' [loplugin:stringview]}} call_view(OUString(std::u16string_view(u"foo"))); |