public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt6-qttools] epel9: Fix build against Clang/LLVM 22
@ 2026-10-08 18:13 Jan Grulich
0 siblings, 0 replies; only message in thread
From: Jan Grulich @ 2026-10-08 18:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/qt6-qttools
Branch : epel9
Commit : c8b2907eed744d8088e24921d9bb64bae1a5f7e4
Author : Jan Grulich <jgrulich@redhat.com>
Date : 2026-03-02T11:18:46+01:00
Stats : +47/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/qt6-qttools/c/c8b2907eed744d8088e24921d9bb64bae1a5f7e4?branch=epel9
Log:
Fix build against Clang/LLVM 22
---
diff --git a/qdoc-support-newer-clang.patch b/qdoc-support-newer-clang.patch
new file mode 100644
index 0000000..49ab293
--- /dev/null
+++ b/qdoc-support-newer-clang.patch
@@ -0,0 +1,43 @@
+diff --git a/src/qdoc/cmake/QDocConfiguration.cmake b/src/qdoc/cmake/QDocConfiguration.cmake
+index aceeb92..c786cb7 100644
+--- a/src/qdoc/cmake/QDocConfiguration.cmake
++++ b/src/qdoc/cmake/QDocConfiguration.cmake
+@@ -8,6 +8,6 @@ set(QDOC_MINIMUM_CLANG_VERSION "17")
+
+ # List of explicitly supported Clang versions for QDoc
+ set(QDOC_SUPPORTED_CLANG_VERSIONS
+- "21.1" "20.1" "19.1" "18.1" "17.0.6"
++ "22.1" "22.0" "21.1" "20.1" "19.1" "18.1" "17.0.6"
+ )
+
+diff --git a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
+index bd9a5fe..fb8beae 100644
+--- a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
++++ b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
+@@ -35,11 +35,25 @@
+ #include <clang/AST/Type.h>
+ #include <clang/AST/TypeLoc.h>
+ #include <clang/Basic/SourceLocation.h>
++QT_WARNING_PUSH
++#if LIBCLANG_VERSION_MAJOR >= 22
++// GCC 15 false positive: misparses a member template inside a class template
++// in LLVM 22's Sema.h, emitting spurious -Wtemplate-body errors.
++QT_WARNING_DISABLE_GCC("-Wtemplate-body")
++#endif
+ #include <clang/Frontend/ASTUnit.h>
++QT_WARNING_POP
+ #include <clang/Lex/Lexer.h>
+ #include <llvm/Support/Casting.h>
+
+-#include "clang/AST/QualTypeNames.h"
++#if LIBCLANG_VERSION_MAJOR >= 22
++// LLVM 22 refactored NestedNameSpecifier to a value type and removed
++// ElaboratedType, making the bundled QualTypeNames.h incompatible.
++// Use the official system header; the implementation is in clang-cpp.
++# include <clang/AST/QualTypeNames.h>
++#else
++# include "clang/AST/QualTypeNames.h"
++#endif
+ #include "template_declaration.h"
+
+ #include <cstdio>
diff --git a/qt6-qttools.spec b/qt6-qttools.spec
index ef3908a..3ec9399 100644
--- a/qt6-qttools.spec
+++ b/qt6-qttools.spec
@@ -32,6 +32,9 @@ Patch1: qttools-run-qttools-with-qt6-suffix.patch
# 32-bit MIPS needs explicit -latomic
Patch2: qttools-add-libatomic.patch
+# Support LLVM/Clang 22
+Patch3: qdoc-support-newer-clang.patch
+
## upstream patches
Source20: assistant.desktop
@@ -155,6 +158,7 @@ Requires: %{name}-common = %{version}-%{release}
%ifarch %{mips32}
%patch -P2 -p1 -b .libatomic
%endif
+%patch -P3 -p1 -b .llvm22
%build
%cmake_qt6 \
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 18:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 18:13 [rpms/qt6-qttools] epel9: Fix build against Clang/LLVM 22 Jan Grulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox