summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/conditionalstring.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/conditionalstring.cxx')
-rw-r--r--compilerplugins/clang/test/conditionalstring.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/compilerplugins/clang/test/conditionalstring.cxx b/compilerplugins/clang/test/conditionalstring.cxx
index f38bc1d2436f..c044ee324b50 100644
--- a/compilerplugins/clang/test/conditionalstring.cxx
+++ b/compilerplugins/clang/test/conditionalstring.cxx
@@ -13,17 +13,14 @@
void f(OUString s, bool b)
{
- // expected-error@+2 {{replace 2nd operand of conditional expression with `rtl::OUStringLiteral` [loplugin:conditionalstring]}}
+ // expected-error@+2 {{replace 2nd operand of conditional expression with `std::u16string_view` [loplugin:conditionalstring]}}
// expected-note@+1 {{conditional expression is here [loplugin:conditionalstring]}}
s += (b ? OUString("a") : throw 0);
- // expected-error@+2 {{replace 2nd operand of conditional expression with `rtl::OUStringLiteral` [loplugin:conditionalstring]}}
- // expected-note@+1 {{conditional expression is here [loplugin:conditionalstring]}}
- s += (b ? OUString("a") : OUStringLiteral(u"b"));
- // expected-error@+1 {{replace both 2nd and 3rd operands of conditional expression with `rtl::OUStringLiteral` [loplugin:conditionalstring]}}
+ // expected-error@+1 {{replace both 2nd and 3rd operands of conditional expression with `std::u16string_view` [loplugin:conditionalstring]}}
b = (b ? ("x") : (OUString(("y")))) == s;
- // expected-error@+1 {{replace both 2nd and 3rd operands of conditional expression with `rtl::OUStringLiteral` [loplugin:conditionalstring]}}
+ // expected-error@+1 {{replace both 2nd and 3rd operands of conditional expression with `std::u16string_view` [loplugin:conditionalstring]}}
b = operator==(s, b ? OUString("x") : OUString("y"));
- // expected-error@+1 {{replace both 2nd and 3rd operands of conditional expression with `rtl::OUStringLiteral` [loplugin:conditionalstring]}}
+ // expected-error@+1 {{replace both 2nd and 3rd operands of conditional expression with `std::u16string_view` [loplugin:conditionalstring]}}
s.operator+=(b ? OUString("x") : OUString("y"));
}