From d106e1e538dc5296a8b62cf1d15260acfa26d8da Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 7 Dec 2022 16:32:55 +0000 Subject: qtcreator: fix build with llvm 15 --- editors/qtcreator/distinfo | 3 +- ...ch-src_plugins_clangformat_clangformatutils.cpp | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp (limited to 'editors') diff --git a/editors/qtcreator/distinfo b/editors/qtcreator/distinfo index 92325a77705..527f2df9fea 100644 --- a/editors/qtcreator/distinfo +++ b/editors/qtcreator/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.5 2021/11/20 20:51:14 wiz Exp $ +$NetBSD: distinfo,v 1.6 2022/12/07 16:32:55 wiz Exp $ BLAKE2s (qt-creator-opensource-src-5.0.3.zip) = 961dcaa2d6b6e2b739d774f4a7b0090730bad4b5cf5c93a80f28c39caafdd9a3 SHA512 (qt-creator-opensource-src-5.0.3.zip) = 9ba7d7a1b506039460efedc9defe974c06905b5024f3e33de2328dcac335ba58d24c2c73ed2083f40305c4393507d6257ff755e2bfe3692cffd601f50bfce131 Size (qt-creator-opensource-src-5.0.3.zip) = 72614121 bytes SHA1 (patch-share_share.pro) = e6f9448295a6eeb78b12979684b53ea29649da95 SHA1 (patch-src_libs_3rdparty_sqlite_sqlite3.c) = fadde723c6e4fe758d9d66e00e95044755913b92 +SHA1 (patch-src_plugins_clangformat_clangformatutils.cpp) = a91cfd9b3a6bd84dfb82ee51dcf562799b974080 diff --git a/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp b/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp new file mode 100644 index 00000000000..291ff8d47b9 --- /dev/null +++ b/editors/qtcreator/patches/patch-src_plugins_clangformat_clangformatutils.cpp @@ -0,0 +1,32 @@ +$NetBSD: patch-src_plugins_clangformat_clangformatutils.cpp,v 1.1 2022/12/07 16:32:55 wiz Exp $ + +Fix build with llvm 15. +https://github.com/qt-creator/qt-creator/commit/b97c9494af2d4d6e53bcc87b588f21a4f445ef6f +and newer + +--- src/plugins/clangformat/clangformatutils.cpp.orig 2021-11-03 11:14:14.000000000 +0000 ++++ src/plugins/clangformat/clangformatutils.cpp +@@ -51,7 +51,10 @@ static clang::format::FormatStyle qtcSty + style.Language = FormatStyle::LK_Cpp; + style.AccessModifierOffset = -4; + style.AlignAfterOpenBracket = FormatStyle::BAS_Align; +-#if LLVM_VERSION_MAJOR >= 12 ++#if 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 +@@ -111,7 +114,11 @@ static clang::format::FormatStyle qtcSty + style.ColumnLimit = 100; + style.CommentPragmas = "^ IWYU pragma:"; + style.CompactNamespaces = false; ++#if LLVM_VERSION_MAJOR >= 15 ++ style.PackConstructorInitializers = FormatStyle::PCIS_BinPack; ++#else + style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; ++#endif + style.ConstructorInitializerIndentWidth = 4; + style.ContinuationIndentWidth = 4; + style.Cpp11BracedListStyle = true; -- cgit v1.2.3