aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch
blob: 337617971d3de3c97d5a628b4223cb9194ee89fe (plain)
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
31
32
From 55b91a76172a3235b4879daf0b675519d5b02db7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de>
Date: Wed, 16 Jun 2021 20:59:29 +0200
Subject: [PATCH] clangformat: Fix build with LLVM 13

Change-Id: Ia9db10696fd129c8b989ecc4c9ecbb7f1f10e68c
Reviewed-by: David Schulz <david.schulz@qt.io>

Upstream-Status: Accepted [https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=55b91a76172a3235b4879daf0b675519d5b02db7]
---
 src/plugins/clangformat/clangformatutils.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
index 2f9a306b99..3905ae5f6a 100644
--- a/src/plugins/clangformat/clangformatutils.cpp
+++ b/src/plugins/clangformat/clangformatutils.cpp
@@ -157,7 +157,11 @@ static clang::format::FormatStyle qtcStyle()
     style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements;
     style.SpaceInEmptyParentheses = false;
     style.SpacesBeforeTrailingComments = 1;
+#if LLVM_VERSION_MAJOR >= 13
+    style.SpacesInAngles = FormatStyle::SIAS_Never;
+#else
     style.SpacesInAngles = false;
+#endif
     style.SpacesInContainerLiterals = false;
     style.SpacesInCStyleCastParentheses = false;
     style.SpacesInParentheses = false;
-- 
2.31.1