mirror of
git://slackware.nl/current.git
synced 2025-01-06 05:25:20 +01:00
03de904154
d/llvm-19.1.2-x86_64-1.txz: Upgraded. Shared library .so-version bump. d/python-setuptools-75.2.0-x86_64-1.txz: Upgraded. kde/calligra-3.2.1-x86_64-45.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/cantor-23.08.5-x86_64-11.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/kdevelop-23.08.5-x86_64-3.txz: Rebuilt. Recompiled against llvm-19.1.2. kde/kfilemetadata-5.116.0-x86_64-8.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/kile-2.9.93-x86_64-38.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/kitinerary-23.08.5-x86_64-9.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/krita-5.2.6-x86_64-2.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/labplot-2.11.1-x86_64-4.txz: Rebuilt. Recompiled against poppler-24.10.0. kde/okular-23.08.5-x86_64-9.txz: Rebuilt. Recompiled against poppler-24.10.0. l/libclc-19.1.2-x86_64-1.txz: Upgraded. Compiled against llvm-19.1.2. l/libssh2-1.11.1-x86_64-1.txz: Upgraded. src: add 'strict KEX' to fix CVE-2023-48795 "Terrapin Attack." For more information, see: https://www.cve.org/CVERecord?id=CVE-2023-48795 (* Security fix *) l/media-player-info-26-noarch-1.txz: Upgraded. l/poppler-24.10.0-x86_64-1.txz: Upgraded. Shared library .so-version bump. l/python-pillow-11.0.0-x86_64-1.txz: Upgraded. l/qt5-5.15.15_20240903_363456a6-x86_64-2.txz: Rebuilt. Patched and recompiled against llvm-19.1.2. l/qt6-6.7.3_20240920_90e86aee-x86_64-3.txz: Rebuilt. Patched and recompiled against llvm-19.1.2. l/spirv-llvm-translator-19.1.0-x86_64-1.txz: Upgraded. Shared library .so-version bump. Compiled against llvm-19.1.2. n/bind-9.20.3-x86_64-1.txz: Upgraded. n/c-ares-1.34.2-x86_64-1.txz: Upgraded. x/mesa-24.2.5-x86_64-1.txz: Upgraded. Compiled against llvm-19.1.2. x/xf86-input-evdev-2.11.0-x86_64-1.txz: Upgraded. x/xf86-input-libinput-1.5.0-x86_64-1.txz: Upgraded. extra/brltty/brltty-6.7-x86_64-1.txz: Upgraded. extra/xv/xv-6.0.2-x86_64-1.txz: Upgraded.
93 lines
4.3 KiB
Diff
93 lines
4.3 KiB
Diff
From 4a368a06afa5929d8674d2e94c2d7cbd6ad85d4e Mon Sep 17 00:00:00 2001
|
|
From: Paul Wicking <paul.wicking@qt.io>
|
|
Date: Fri, 13 Sep 2024 14:37:38 +0200
|
|
Subject: [PATCH] QDoc: Adapt to breaking changes in LLVM 19
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Due to upstream changes in LLVM 19, QDoc fails to compile when linked
|
|
against Clang libraries from this version of LLVM. Three issues arise;
|
|
|
|
- Two cases of passing an argument of wrong type to a function.
|
|
- One case of accessing a non-existing member of an enumeration.
|
|
|
|
One upstream change (see [0]) is responsible for two of the issues:
|
|
|
|
- `get_expression_as_string()` is modified such that it correctly
|
|
obtains the parameter type when calling
|
|
`get_fully_qualified_type_name()`, by appending
|
|
`.getArgument().getAsType()` to the call to `getDefaultArgument()`.
|
|
- `get_default_value_initializer_as_string()` is modified such that it
|
|
correctly passes the source expression to
|
|
`get_expression_as_string()`, by appending `.getSourceExpression()`
|
|
to the call to `getDefaultArgument()`.
|
|
|
|
Both of these changes are is incompatible with QDoc built against
|
|
Clang libraries from earlier versions of LLVM, and are therefore
|
|
wrapped in #if-ery.
|
|
|
|
Finally, LLVM 19 drops a value used in QDoc from the enumeration
|
|
`clang::TemplateName::Qualified`, see [1]. The enum value `Fully` is
|
|
removed without replacement. The enum is left with two values,
|
|
`AsWritten` and `None`. QDoc is modified such that it relies on the
|
|
former of the two. This change doesn't cause any change in output from
|
|
QDoc when built against Clang libraries from LLVM 17 and 18, and the
|
|
change is therefore not wrapped in #if-ery.
|
|
|
|
[0] - https://github.com/llvm/llvm-project/commit/e42b799bb28815431f2c5a95f7e13fde3f1b36a1
|
|
[1] - https://github.com/llvm/llvm-project/commit/9c4a716c12920
|
|
|
|
Done-with: Khem Raj <raj.khem@gmail.com>
|
|
Fixes: QTBUG-128644
|
|
Pick-to: 6.8
|
|
Change-Id: I34fbb46cf28b5676b4adda5e563d6d59fc40f602
|
|
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
|
|
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
---
|
|
src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp | 13 ++++++++++++-
|
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
|
|
index eb3a781bc..385d651ec 100644
|
|
--- a/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
|
|
+++ b/src/qdoc/qdoc/src/qdoc/clangcodeparser.cpp
|
|
@@ -207,9 +207,15 @@ static std::string get_expression_as_string(const clang::Expr* expression, const
|
|
* If the parameter has no default value the empty string will be returned.
|
|
*/
|
|
static std::string get_default_value_initializer_as_string(const clang::TemplateTypeParmDecl* parameter) {
|
|
+#if LIBCLANG_VERSION_MAJOR >= 19
|
|
+ return (parameter && parameter->hasDefaultArgument()) ?
|
|
+ get_fully_qualified_type_name(parameter->getDefaultArgument().getArgument().getAsType(), parameter->getASTContext()) :
|
|
+ "";
|
|
+#else
|
|
return (parameter && parameter->hasDefaultArgument()) ?
|
|
get_fully_qualified_type_name(parameter->getDefaultArgument(), parameter->getASTContext()) :
|
|
"";
|
|
+#endif
|
|
|
|
}
|
|
|
|
@@ -223,8 +229,13 @@ static std::string get_default_value_initializer_as_string(const clang::Template
|
|
* If the parameter as no default value the empty string will be returned.
|
|
*/
|
|
static std::string get_default_value_initializer_as_string(const clang::NonTypeTemplateParmDecl* parameter) {
|
|
+#if LIBCLANG_VERSION_MAJOR >= 19
|
|
+ return (parameter && parameter->hasDefaultArgument()) ?
|
|
+ get_expression_as_string(parameter->getDefaultArgument().getSourceExpression(), parameter->getASTContext()) : "";
|
|
+#else
|
|
return (parameter && parameter->hasDefaultArgument()) ?
|
|
get_expression_as_string(parameter->getDefaultArgument(), parameter->getASTContext()) : "";
|
|
+#endif
|
|
|
|
}
|
|
|
|
@@ -244,7 +255,7 @@ static std::string get_default_value_initializer_as_string(const clang::Template
|
|
const clang::TemplateName template_name = parameter->getDefaultArgument().getArgument().getAsTemplate();
|
|
|
|
llvm::raw_string_ostream ss{default_value};
|
|
- template_name.print(ss, parameter->getASTContext().getPrintingPolicy(), clang::TemplateName::Qualified::Fully);
|
|
+ template_name.print(ss, parameter->getASTContext().getPrintingPolicy(), clang::TemplateName::Qualified::AsWritten);
|
|
}
|
|
|
|
return default_value;
|