From bcd4bdc07b5b0ed04d01cdc906d76ad94f977402 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 4 Dec 2024 17:16:17 -0600 Subject: user/qt-creator: Add support for LLVM 18 Patches were cherry-picked from upstream. --- user/qt-creator/llvm17.patch | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 user/qt-creator/llvm17.patch (limited to 'user/qt-creator/llvm17.patch') diff --git a/user/qt-creator/llvm17.patch b/user/qt-creator/llvm17.patch new file mode 100644 index 000000000..3e4803bbf --- /dev/null +++ b/user/qt-creator/llvm17.patch @@ -0,0 +1,38 @@ +From 9ad9e49ccf6e0d7f4ba5765cff3af63fbbed60e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= +Date: Wed, 2 Aug 2023 12:39:13 +0200 +Subject: [PATCH] clang-format: Fix build with LLVM 17 + +Change-Id: Ie6377be3be4a8c785d53f1eceabcc4811db4229d +Reviewed-by: Christian Kandeler +--- + src/plugins/clangformat/clangformatutils.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp +index 928d30d241e..1aae91a186f 100644 +--- a/src/plugins/clangformat/clangformatutils.cpp ++++ b/src/plugins/clangformat/clangformatutils.cpp +@@ -165,7 +165,9 @@ clang::format::FormatStyle qtcStyle() + style.SpaceAfterTemplateKeyword = false; + style.SpaceBeforeAssignmentOperators = true; + style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements; ++#if LLVM_VERSION_MAJOR < 17 + style.SpaceInEmptyParentheses = false; ++#endif + style.SpacesBeforeTrailingComments = 1; + #if LLVM_VERSION_MAJOR >= 13 + style.SpacesInAngles = FormatStyle::SIAS_Never; +@@ -173,8 +175,12 @@ clang::format::FormatStyle qtcStyle() + style.SpacesInAngles = false; + #endif + style.SpacesInContainerLiterals = false; ++#if LLVM_VERSION_MAJOR >= 17 ++ style.SpacesInParens = FormatStyle::SIPO_Never; ++#else + style.SpacesInCStyleCastParentheses = false; + style.SpacesInParentheses = false; ++#endif + style.SpacesInSquareBrackets = false; + addQtcStatementMacros(style); + style.Standard = FormatStyle::LS_Cpp11; -- cgit v1.2.3-70-g09d2