summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch')
-rw-r--r--recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch b/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch
new file mode 100644
index 00000000..33761797
--- /dev/null
+++ b/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch
@@ -0,0 +1,32 @@
1From 55b91a76172a3235b4879daf0b675519d5b02db7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de>
3Date: Wed, 16 Jun 2021 20:59:29 +0200
4Subject: [PATCH] clangformat: Fix build with LLVM 13
5
6Change-Id: Ia9db10696fd129c8b989ecc4c9ecbb7f1f10e68c
7Reviewed-by: David Schulz <david.schulz@qt.io>
8
9Upstream-Status: Accepted [https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=55b91a76172a3235b4879daf0b675519d5b02db7]
10---
11 src/plugins/clangformat/clangformatutils.cpp | 4 ++++
12 1 file changed, 4 insertions(+)
13
14diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
15index 2f9a306b99..3905ae5f6a 100644
16--- a/src/plugins/clangformat/clangformatutils.cpp
17+++ b/src/plugins/clangformat/clangformatutils.cpp
18@@ -157,7 +157,11 @@ static clang::format::FormatStyle qtcStyle()
19 style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements;
20 style.SpaceInEmptyParentheses = false;
21 style.SpacesBeforeTrailingComments = 1;
22+#if LLVM_VERSION_MAJOR >= 13
23+ style.SpacesInAngles = FormatStyle::SIAS_Never;
24+#else
25 style.SpacesInAngles = false;
26+#endif
27 style.SpacesInContainerLiterals = false;
28 style.SpacesInCStyleCastParentheses = false;
29 style.SpacesInParentheses = false;
30--
312.31.1
32