diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-18 15:15:09 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-18 17:40:26 +0100 |
commit | d2c54902102ab9ee40cca16ae21f1bf3ad7c4066 (patch) | |
tree | b5a1cd806ad4ca2c5a7a4cd488a05a76773d79ef /compilerplugins/clang/checkconfigmacros.cxx | |
parent | tdf#158720 Fix crash when searching expert config with gen vcl plugin (diff) | |
download | core-d2c54902102ab9ee40cca16ae21f1bf3ad7c4066.tar.gz core-d2c54902102ab9ee40cca16ae21f1bf3ad7c4066.zip |
-Werror,-Wdeprecated-declarations
> compilerplugins/clang/casttovoid.cxx:452:18: error: 'endswith' is deprecated: Use ends_with instead [-Werror,-Wdeprecated-declarations]
> .endswith(".h"));
> ^~~~~~~~
> ends_with
> ~/llvm/inst/include/llvm/ADT/StringRef.h:276:19: note: 'endswith' has been explicitly marked deprecated here
> [[nodiscard]] LLVM_DEPRECATED(
> ^
etc. after
<https://github.com/llvm/llvm-project/commit/5ac12951b4e9bbfcc5791282d0961ec2b65575e9>
"[ADT] Deprecate StringRef::{starts,ends}with (#75491)" on Clang 18 trunk, where
<https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242>
"[ADT] Introduce StringRef::{starts,ends}_width{,_insensitive}" had been added
towards Clang 16
Change-Id: Icb3e43b7d6be6f877815285913d846f766eddebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'compilerplugins/clang/checkconfigmacros.cxx')
-rw-r--r-- | compilerplugins/clang/checkconfigmacros.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/checkconfigmacros.cxx b/compilerplugins/clang/checkconfigmacros.cxx index aea60ed561b5..4bed4c82502c 100644 --- a/compilerplugins/clang/checkconfigmacros.cxx +++ b/compilerplugins/clang/checkconfigmacros.cxx @@ -12,6 +12,7 @@ #include <memory> #include <set> +#include "compat.hxx" #include "plugin.hxx" #include "config_clang.h" @@ -71,7 +72,7 @@ void CheckConfigMacros::MacroDefined( const Token& macroToken, const MacroDirect // fprintf(stderr,"DEF: %s %s\n", macroToken.getIdentifierInfo()->getName().data(), filename ); StringRef macro = macroToken.getIdentifierInfo()->getName(); // Skia #defines do not have values, but we set them in config_skia.h . - if( macro.startswith( "SK_" ) && loplugin::isSamePathname(filename, BUILDDIR "/config_host/config_skia.h")) + if( compat::starts_with(macro, "SK_" ) && loplugin::isSamePathname(filename, BUILDDIR "/config_host/config_skia.h")) return; configMacros.insert( macro.str()); } |