summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/stringliteralvar.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-10-25 11:58:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-10-25 13:05:40 +0200
commit98eb119fed253b0af7a3b5c9a28905d29118167f (patch)
tree0a2e7a9d750fe03c54c96f57481cbbea789a3b8b /compilerplugins/clang/test/stringliteralvar.cxx
parenteba4b90d2eba5e4dbf75c1a7fcd7ce13112d4db5 (diff)
Adapt to Clang 14 trunk diagnostic output change
<https://github.com/llvm/llvm-project/commit/aee49255074fd4ef38d97e6e70cbfbf2f9fd0fa7> "Recommit: Compress formatting of array type names (int [4] -> int[4])" Change-Id: I911934a778fddde0d0022f2e2601d1f9c371fe69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test/stringliteralvar.cxx')
-rw-r--r--compilerplugins/clang/test/stringliteralvar.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/compilerplugins/clang/test/stringliteralvar.cxx b/compilerplugins/clang/test/stringliteralvar.cxx
index 33d6b638629c..1389146b6222 100644
--- a/compilerplugins/clang/test/stringliteralvar.cxx
+++ b/compilerplugins/clang/test/stringliteralvar.cxx
@@ -14,7 +14,7 @@
#include <rtl/ustring.hxx>
#include <sal/macros.h>
-// expected-error@+1 {{change type of variable 'literal1' from constant character array ('const char [4]') to OStringLiteral [loplugin:stringliteralvar]}}
+// expected-error-re@+1 {{change type of variable 'literal1' from constant character array ('const char{{ ?}}[4]') to OStringLiteral [loplugin:stringliteralvar]}}
char const literal1[] = "foo";
OString f1()
{
@@ -25,7 +25,7 @@ OString f1()
void f(OUString const&);
void f2()
{
- // expected-error@+1 {{change type of variable 'literal' from constant character array ('const char [4]') to OUStringLiteral, and make it static [loplugin:stringliteralvar]}}
+ // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const char{{ ?}}[4]') to OUStringLiteral, and make it static [loplugin:stringliteralvar]}}
char const literal[] = "foo";
// expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
f(literal);
@@ -33,7 +33,7 @@ void f2()
struct S3
{
- // expected-error@+1 {{change type of variable 'literal' from constant character array ('const char16_t [4]') to OUStringLiteral [loplugin:stringliteralvar]}}
+ // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const char16_t{{ ?}}[4]') to OUStringLiteral [loplugin:stringliteralvar]}}
static constexpr char16_t literal[] = u"foo";
};
void f3()
@@ -44,7 +44,7 @@ void f3()
std::vector<OUString> f4()
{
- // expected-error@+1 {{change type of variable 'literal' from constant character array ('const char16_t [4]') to OUStringLiteral [loplugin:stringliteralvar]}}
+ // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const char16_t{{ ?}}[4]') to OUStringLiteral [loplugin:stringliteralvar]}}
static constexpr char16_t literal[] = u"foo";
// expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
return { literal };
@@ -81,7 +81,7 @@ void f8()
void f9()
{
- // expected-error@+1 {{change type of variable 'literal' from constant character array ('const sal_Unicode [3]') to OUStringLiteral [loplugin:stringliteralvar]}}
+ // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const sal_Unicode{{ ?}}[3]') to OUStringLiteral [loplugin:stringliteralvar]}}
static sal_Unicode const literal[] = { 'f', 'o', 'o' };
// expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
f(OUString(literal, SAL_N_ELEMENTS(literal)));
@@ -89,7 +89,7 @@ void f9()
void f10()
{
- // expected-error@+1 {{change type of variable 'literal' from constant character array ('const sal_Unicode [3]') to OUStringLiteral [loplugin:stringliteralvar]}}
+ // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const sal_Unicode{{ ?}}[3]') to OUStringLiteral [loplugin:stringliteralvar]}}
static sal_Unicode const literal[] = { 'f', 'o', 'o' };
// expected-note@+1 {{first passed into a 'rtl::OUString' constructor here [loplugin:stringliteralvar]}}
f(OUString(literal, 3));
@@ -97,7 +97,7 @@ void f10()
void f11(int nStreamType)
{
- // expected-error@+1 {{change type of variable 'sDocumentType' from constant character array ('const char [4]') to OUStringLiteral, and make it static [loplugin:stringliteralvar]}}
+ // expected-error-re@+1 {{change type of variable 'sDocumentType' from constant character array ('const char{{ ?}}[4]') to OUStringLiteral, and make it static [loplugin:stringliteralvar]}}
const char sDocumentType[] = "foo";
OUString sStreamType;
switch (nStreamType)