summaryrefslogtreecommitdiff
path: root/user/qt-creator/llvm18.patch
blob: 7294dec49b183b97fb90e349af97664132db4291 (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
30
From 7457b623125f4bcdb7941769a385cfbfc0dcbf2b Mon Sep 17 00:00:00 2001
From: hjk <hjk@qt.io>
Date: Fri, 8 Nov 2024 12:50:30 +0100
Subject: [PATCH] ClangFormat: Fix warning on uninitialized struct member

Clang 18's AlignConsecutiveStyle has a new bool AlignFunctionPointers member.

Change-Id: I5d72d9caa4a6e58ffa09674d2d3b976a95ea5dd0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
---
 src/plugins/clangformat/clangformatutils.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- qt-creator-opensource-src-4.15.2/src/plugins/clangformat/clangformatutils.cpp.old	2024-12-04 16:32:21.224382015 -0600
+++ qt-creator-opensource-src-4.15.2/src/plugins/clangformat/clangformatutils.cpp	2024-12-04 17:12:21.181020408 -0600
@@ -51,7 +51,13 @@
     style.Language = FormatStyle::LK_Cpp;
     style.AccessModifierOffset = -4;
     style.AlignAfterOpenBracket = FormatStyle::BAS_Align;
-#if LLVM_VERSION_MAJOR >= 12
+#if LLVM_VERSION_MAJOR >= 18
+    style.AlignConsecutiveAssignments = {false, false, false, false, false, false};
+    style.AlignConsecutiveDeclarations = {false, false, false, false, false, false};
+#elif LLVM_VERSION_MAJOR >= 15
+    style.AlignConsecutiveAssignments = {false, false, false, false, false};
+    style.AlignConsecutiveDeclarations = {false, false, false, false, false};
+#elif LLVM_VERSION_MAJOR >= 12
     style.AlignConsecutiveAssignments = FormatStyle::ACS_None;
     style.AlignConsecutiveDeclarations = FormatStyle::ACS_None;
 #else