From 2a242032f9496308eed36d7dd2abb4eed762fa9f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 15 Nov 2023 14:51:07 +0100 Subject: 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 --- compilerplugins/clang/test/ostr.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compilerplugins') 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]}} -- cgit