Skip to content

Commit

Permalink
qtcreator: fix build with llvm 15
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz committed Dec 7, 2022
1 parent 9f35ad5 commit d106e1e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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
@@ -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;

0 comments on commit d106e1e

Please sign in to comment.