public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Grulich <jgrulich@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/qt6-qttools] epel9: Fix build against Clang/LLVM 22
Date: Thu, 08 Oct 2026 18:13:58 GMT	[thread overview]
Message-ID: <179148323861.1.930932395512544094.rpms-qt6-qttools-c8b2907eed74@fedoraproject.org> (raw)

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 \

                 reply	other threads:[~2026-10-08 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179148323861.1.930932395512544094.rpms-qt6-qttools-c8b2907eed74@fedoraproject.org \
    --to=jgrulich@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox