blob: a3591217149592f93242b99913f4afee75a578cc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
|