summaryrefslogtreecommitdiff
path: root/user/qt-creator/llvm16-deux.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-12-04 17:16:17 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-12-04 17:16:17 -0600
commitbcd4bdc07b5b0ed04d01cdc906d76ad94f977402 (patch)
tree6ffbd8c677076e9804b5c1ef4375d38e8a03eaeb /user/qt-creator/llvm16-deux.patch
parentf160dc08c3148f0c343ee087c6725da9b443c4ee (diff)
downloadpackages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.tar.gz
packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.tar.bz2
packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.tar.xz
packages-bcd4bdc07b5b0ed04d01cdc906d76ad94f977402.zip
user/qt-creator: Add support for LLVM 18
Patches were cherry-picked from upstream.
Diffstat (limited to 'user/qt-creator/llvm16-deux.patch')
-rw-r--r--user/qt-creator/llvm16-deux.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/user/qt-creator/llvm16-deux.patch b/user/qt-creator/llvm16-deux.patch
new file mode 100644
index 000000000..00f35016c
--- /dev/null
+++ b/user/qt-creator/llvm16-deux.patch
@@ -0,0 +1,45 @@
+From f4545807defdfb493c1d66a19430a69d81afa40b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <schaepers@kuennecke.com>
+Date: Fri, 4 Nov 2022 07:18:50 +0100
+Subject: [PATCH] clang-format: Adapt to LLVM 16
+
+Change-Id: I2e35f92db6de10b1e4bf173f0864f0cd893a011f
+Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
+Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
+---
+ src/plugins/clangformat/clangformatbaseindenter.cpp | 4 ++++
+ src/plugins/clangformat/clangformatutils.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp
+index 7c83c8e43b2..6072082c8c7 100644
+--- a/src/plugins/clangformat/clangformatbaseindenter.cpp
++++ b/src/plugins/clangformat/clangformatbaseindenter.cpp
+@@ -55,7 +55,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
+
+ // This is a separate pass, don't do it unless it's the full formatting.
+ style.FixNamespaceComments = false;
++#if LLVM_VERSION_MAJOR >= 16
++ style.AlignTrailingComments = {clang::format::FormatStyle::TCAS_Never, 0};
++#else
+ style.AlignTrailingComments = false;
++#endif
+
+ if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
+ return;
+diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
+index dbc4a6a347e..3b2901bcc8b 100644
+--- a/src/plugins/clangformat/clangformatutils.cpp
++++ b/src/plugins/clangformat/clangformatutils.cpp
+@@ -64,7 +64,11 @@ clang::format::FormatStyle qtcStyle()
+ #else
+ style.AlignOperands = true;
+ #endif
++#if LLVM_VERSION_MAJOR >= 16
++ style.AlignTrailingComments = {FormatStyle::TCAS_Always, 0};
++#else
+ style.AlignTrailingComments = true;
++#endif
+ style.AllowAllParametersOfDeclarationOnNextLine = true;
+ #if LLVM_VERSION_MAJOR >= 10
+ style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;