diff options
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.patch | 30 |
1 files changed, 30 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..d2678b0c --- /dev/null +++ b/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch @@ -0,0 +1,30 @@ +From d13fc5742cb3afc876218fab303880a5da124c8a 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] +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + 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 770e75908c..8017411fb3 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; |