Add back test for struct initialization

...that had been removed as part of f99bee8103
"Delete OUString UTF-16 string literal ctor/assignment op"

Change-Id: I22423306ab35dcb580ecc90daea3219b6c1578b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159446
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2023-11-15 17:20:38 +01:00
parent 4b9394c6d0
commit 2a242032f9
+3
View File
@@ -60,6 +60,9 @@ void f()
// expected-error-re@+1 {{use a _ustr user-defined string literal instead of constructing an instance of '{{(rtl::)?}}OUString' from an ordinary string literal [loplugin:ostr]}}
f((("foo")));
// expected-error-re@+1 {{use a _ustr user-defined string literal instead of constructing an instance of '{{(rtl::)?}}OUString' from an ordinary string literal [loplugin:ostr]}}
S s10 = { "foo" };
// Only generate one warning here, not two, for a macro argument used twice in the macro's
// expansion:
// expected-error-re@+1 {{use a _ustr user-defined string literal instead of constructing an instance of '{{(rtl::)?}}OUString' from an ordinary string literal [loplugin:ostr]}}