Patch-Source: https://github.com/qt-creator/qt-creator/commit/a1bfcbf30d493e1e1fab94851fe50fed81cd3d6e From a1bfcbf30d493e1e1fab94851fe50fed81cd3d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Wed, 27 Jul 2022 13:46:27 +0200 Subject: [PATCH] ClangFormat: Fix compilation with LLVM 15 Change-Id: I7990e8331c317d3bc363be610b2585d37dee4445 Reviewed-by: Reviewed-by: Christian Kandeler --- src/plugins/clangformat/clangformatutils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp index 11c3a0062ab..31660de3392 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -96,7 +96,9 @@ clang::format::FormatStyle qtcStyle() style.ColumnLimit = 100; style.CommentPragmas = "^ IWYU pragma:"; style.CompactNamespaces = false; -#if LLVM_VERSION_MAJOR < 15 +#if LLVM_VERSION_MAJOR >= 15 + style.PackConstructorInitializers = FormatStyle::PCIS_BinPack; +#else style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; #endif style.ConstructorInitializerIndentWidth = 4;