diff options
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/test/constvars.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/test/stringliteralvar.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/test/constvars.cxx b/compilerplugins/clang/test/constvars.cxx index 88df50f8e199..80acdb67528d 100644 --- a/compilerplugins/clang/test/constvars.cxx +++ b/compilerplugins/clang/test/constvars.cxx @@ -22,8 +22,8 @@ namespace test1 { int const aFormalArgs[] = { 1, 2 }; // expected-error@+1 {{var can be const [loplugin:constvars]}} -static sal_uInt16 nMediaArgsCount = SAL_N_ELEMENTS(aFormalArgs); -sal_uInt16 foo() +static std::size_t const nMediaArgsCount = std::size(aFormalArgs); +std::size_t foo() { (void)aFormalArgs; return nMediaArgsCount; diff --git a/compilerplugins/clang/test/stringliteralvar.cxx b/compilerplugins/clang/test/stringliteralvar.cxx index f04e54756284..a73f1c51dbd9 100644 --- a/compilerplugins/clang/test/stringliteralvar.cxx +++ b/compilerplugins/clang/test/stringliteralvar.cxx @@ -84,7 +84,7 @@ void f9() // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const sal_Unicode{{ ?}}[3]'{{( \(aka 'const char16_t\[3\]'\))?}}) to OUStringLiteral [loplugin:stringliteralvar]}} static sal_Unicode const literal[] = { 'f', 'o', 'o' }; // expected-note-re@+1 {{first passed into a '{{(rtl::)?}}OUString' constructor here [loplugin:stringliteralvar]}} - f(OUString(literal, SAL_N_ELEMENTS(literal))); + f(OUString(literal, std::size(literal))); } void f10() |