1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/testing/qt-creator/clang15-2.patch
2022-09-30 08:40:59 +02:00

28 lines
1.3 KiB
Diff

Patch-Source: https://github.com/qt-creator/qt-creator/commit/a1bfcbf30d493e1e1fab94851fe50fed81cd3d6e
From a1bfcbf30d493e1e1fab94851fe50fed81cd3d6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de>
Date: Wed, 27 Jul 2022 13:46:27 +0200
Subject: [PATCH] ClangFormat: Fix compilation with LLVM 15
Change-Id: I7990e8331c317d3bc363be610b2585d37dee4445
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
---
src/plugins/clangformat/clangformatutils.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
index 11c3a0062ab..31660de3392 100644
--- a/src/plugins/clangformat/clangformatutils.cpp
+++ b/src/plugins/clangformat/clangformatutils.cpp
@@ -96,7 +96,9 @@ clang::format::FormatStyle qtcStyle()
style.ColumnLimit = 100;
style.CommentPragmas = "^ IWYU pragma:";
style.CompactNamespaces = false;
-#if LLVM_VERSION_MAJOR < 15
+#if LLVM_VERSION_MAJOR >= 15
+ style.PackConstructorInitializers = FormatStyle::PCIS_BinPack;
+#else
style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
#endif
style.ConstructorInitializerIndentWidth = 4;