summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-04-18 22:30:51 +0200
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-04-19 07:47:03 +0200
commit495dddd2f57feaa94447a632b8af317932d70f9d (patch)
treec90d4fee435c67a4d514aaae36f3903e9ae2919c /compilerplugins
parent2642643ec07cd7f3d28fe558769297578c36de19 (diff)
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.bergmann@allotropia.de>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/compat.hxx8
-rw-r--r--compilerplugins/clang/unusedmember.cxx2
2 files changed, 9 insertions, 1 deletions
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;
}