compilerplugins/clang/compat.hxx | 8 ++++++++ compilerplugins/clang/unusedmember.cxx | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
New commits: commit 495dddd2f57feaa94447a632b8af317932d70f9d Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Thu Apr 18 22:30:51 2024 +0200 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Fri Apr 19 07:47:03 2024 +0200 Adapt to Clang 19 trunk isUnnamedBitfield -> isUnnamedBitField rename <github.com/llvm/llvm-project/commit/3d56ea05b6c746a7144f643bef2ebd599f605b8b> "[clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization" Change-Id: I198e19c00774ba111a441be2afe0b2a992cd6f0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166268 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index cc3192ea9204..ac2a282c4fd8 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -250,6 +250,14 @@ inline bool isPureVirtual(clang::FunctionDecl const * decl) { #endif } +inline bool isUnnamedBitField(clang::FieldDecl const * decl) { +#if CLANG_VERSION >= 190000 + return decl->isUnnamedBitField(); +#else + return decl->isUnnamedBitfield(); +#endif +} + inline clang::TemplateTypeParmDecl const * getReplacedParameter( clang::SubstTemplateTypeParmType const * type) { diff --git a/compilerplugins/clang/unusedmember.cxx b/compilerplugins/clang/unusedmember.cxx index 305f9c606d31..610c94e162b3 100644 --- a/compilerplugins/clang/unusedmember.cxx +++ b/compilerplugins/clang/unusedmember.cxx @@ -155,7 +155,7 @@ public: } if (auto const d1 = dyn_cast<FieldDecl>(d)) { - if (d1->isUnnamedBitfield()) + if (compat::isUnnamedBitField(d1)) { continue; }