summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-15 14:51:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-15 17:20:38 +0100
commit2a242032f9496308eed36d7dd2abb4eed762fa9f (patch)
tree80a45ffa8bc501e42497179ed677c0e7d709df4d /compilerplugins
parent4b9394c6d00bd2d041457c03c93066ed8eb5cb15 (diff)
Add back test for struct initialization
...that had been removed as part of f99bee8103ad82dac2e53e114527399c4af5485c "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>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/test/ostr.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/ostr.cxx b/compilerplugins/clang/test/ostr.cxx
index c481fa06ea07..22cafc731d3e 100644
--- a/compilerplugins/clang/test/ostr.cxx
+++ b/compilerplugins/clang/test/ostr.cxx
@@ -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]}}