summaryrefslogtreecommitdiff
path: root/user/qt-creator/llvm15.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/qt-creator/llvm15.patch')
-rw-r--r--user/qt-creator/llvm15.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/qt-creator/llvm15.patch b/user/qt-creator/llvm15.patch
new file mode 100644
index 000000000..a35912171
--- /dev/null
+++ b/user/qt-creator/llvm15.patch
@@ -0,0 +1,29 @@
+From c7cdd55dea1f30b4d236d532bdadcf36bd174640 Mon Sep 17 00:00:00 2001
+From: Cristian Adam <cristian.adam@qt.io>
+Date: Tue, 16 Aug 2022 21:04:39 +0200
+Subject: [PATCH] ClangFormat: Fix build for LLVM 15.0.0
+
+This fixes the CMake build of Qt Creator against LLVM 15.0.0
+
+Change-Id: Icecd45821091c8c2b565246cb17ce5a6e5c49f36
+Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
+Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
+---
+ src/plugins/clangformat/CMakeLists.txt | 2 ++
+ src/plugins/clangformat/clangformatutils.cpp | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
+index 230078558e5..973c1050772 100644
+--- a/src/plugins/clangformat/clangformatutils.cpp
++++ b/src/plugins/clangformat/clangformatutils.cpp
+@@ -111,7 +111,9 @@ clang::format::FormatStyle qtcStyle()
+ style.ColumnLimit = 100;
+ style.CommentPragmas = "^ IWYU pragma:";
+ style.CompactNamespaces = false;
++#if LLVM_VERSION_MAJOR < 15
+ style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
++#endif
+ style.ConstructorInitializerIndentWidth = 4;
+ style.ContinuationIndentWidth = 4;
+ style.Cpp11BracedListStyle = true;