Avoid --disable-assert-always-abort loplugin:stringviewparam false positives
...like
> l10ntools/source/helper.cxx:19:69: error: replace function parameter of type 'const rtl::OString &' with 'std::string_view' [loplugin:stringviewparam]
> const OString& rText, const OString& rUnEscaped, const OString& rEscaped )
> ~~~~~~~~~~~~~~~^~~~~~~~
where the call to rEscaped.getLength(), which would otherwise suppress the
warning, is hidden inside an assert.
(Similar to aab0322580
"Disable
loplugin:casttovoid when --disable-assert-always-abort".)
Change-Id: Ie054f75317707757b1c6243c593f539d445a9fee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110331
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -504,6 +504,10 @@ private:
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (compiler.getPreprocessor().getIdentifierInfo("NDEBUG")->hasMacroDefinition())
|
||||
{
|
||||
return;
|
||||
}
|
||||
StringRef fn(handler.getMainFileName());
|
||||
// leave the string QA tests alone
|
||||
if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/qa/"))
|
||||
|
@@ -7,6 +7,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#undef NDEBUG
|
||||
|
||||
#include "sal/config.h"
|
||||
|
||||
#include <string_view>
|
||||
|
Reference in New Issue
Block a user