diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-10-13 14:07:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-13 15:37:24 +0200 |
commit | 5956cecdf61846671f7d028ad60623e1e840ad3f (patch) | |
tree | d1247ff7b2832289c837bcee71aff7e6fb2136f9 /compilerplugins/clang/test/stringview.cxx | |
parent | 41403fbff8140ad0ca7cf8f81d37cddcfbd19197 (diff) |
Adapt CompilerTest_compilerplugins_clang to recent Clang
...where at least my recent Clang 16 trunk build now started to fail after
af2879e434fa0dc6b2a626617ed865e4f66eb5ad "Deduplicate stringconcat more" with
> error: 'error' diagnostics expected but not seen:
> File compilerplugins/clang/test/stringview.cxx Line 171 (directive at compilerplugins/clang/test/stringview.cxx:170): instead of an '{{(rtl::)?}}OString' constructed from a 'OStringConcat<rtl::OString, rtl::OString>' (aka 'StringConcat<char, rtl::OString, rtl::OString>'), pass a 'std::string_view' via 'rtl::Concat2View' [loplugin:stringview]
> File compilerplugins/clang/test/stringview.cxx Line 196 (directive at compilerplugins/clang/test/stringview.cxx:195): instead of an '{{(rtl::)?}}OUString' constructed from a 'OUStringConcat<rtl::OUString, rtl::OUString>' (aka 'StringConcat<char16_t, rtl::OUString, rtl::OUString>'), pass a 'std::u16string_view' via 'rtl::Concat2View' [loplugin:stringview]
> error: 'error' diagnostics seen but not expected:
> File compilerplugins/clang/test/stringview.cxx Line 171: instead of an 'OString' constructed from a 'OStringConcat<OString, OString>' (aka 'StringConcat<char, rtl::OString, rtl::OString>'), pass a 'std::string_view' via 'rtl::Concat2View' [loplugin:stringview]
> File compilerplugins/clang/test/stringview.cxx Line 196: instead of an 'OUString' constructed from a 'OUStringConcat<OUString, OUString>' (aka 'StringConcat<char16_t, rtl::OUString, rtl::OUString>'), pass a 'std::u16string_view' via 'rtl::Concat2View' [loplugin:stringview]
> 4 errors generated.
> make[1]: *** [solenv/gbuild/LinkTarget.mk:337: workdir/CxxObject/compilerplugins/clang/test/stringview.o] Error 1
Change-Id: I0b8c7d4a012c40c2c2c3cc8a9e55c52f45e8cfc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141295
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test/stringview.cxx')
-rw-r--r-- | compilerplugins/clang/test/stringview.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/test/stringview.cxx b/compilerplugins/clang/test/stringview.cxx index cd59f6c3c73a..2ba87c13c31d 100644 --- a/compilerplugins/clang/test/stringview.cxx +++ b/compilerplugins/clang/test/stringview.cxx @@ -167,7 +167,7 @@ void f5(char const* s1, sal_Int32 n1, char16_t const* s2, sal_Int32 n2, OString call_view(OString(std::string_view("foo"))); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'OStringNumber<int>', pass a 'std::string_view' [loplugin:stringview]}} call_view(OString(OString::number(0))); - // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'OStringConcat<rtl::OString, rtl::OString>' (aka 'StringConcat<char, rtl::OString, rtl::OString>'), pass a 'std::string_view' via 'rtl::Concat2View' [loplugin:stringview]}} + // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'OStringConcat<{{(rtl::)?}}OString, {{(rtl::)?}}OString>' (aka 'StringConcat<char, rtl::OString, rtl::OString>'), pass a 'std::string_view' via 'rtl::Concat2View' [loplugin:stringview]}} call_view(OString(s3 + s3)); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString', pass a 'std::u16string_view' [loplugin:stringview]}} call_view(OUString()); @@ -192,7 +192,7 @@ void f5(char const* s1, sal_Int32 n1, char16_t const* s2, sal_Int32 n2, OString call_view(OUString(std::u16string_view(u"foo"))); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'OUStringNumber<int>', pass a 'std::u16string_view' [loplugin:stringview]}} call_view(OUString(OUString::number(0))); - // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'OUStringConcat<rtl::OUString, rtl::OUString>' (aka 'StringConcat<char16_t, rtl::OUString, rtl::OUString>'), pass a 'std::u16string_view' via 'rtl::Concat2View' [loplugin:stringview]}} + // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'OUStringConcat<{{(rtl::)?}}OUString, {{(rtl::)?}}OUString>' (aka 'StringConcat<char16_t, rtl::OUString, rtl::OUString>'), pass a 'std::u16string_view' via 'rtl::Concat2View' [loplugin:stringview]}} call_view(OUString(s4 + s4)); (void)(s3 == l1); |