From 740135f74d6ca6b7d4aa62bce1644c7f90e7d812 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 26 Aug 2024 13:41:06 +0200 Subject: [PATCH] ClangFormat: Adapt to upstream API change Change-Id: I171f7432499459a14621c1887e69945ab506a734 Reviewed-by: Artem Sokolovskii --- 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 7beb062a45e..573b489cea7 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -69,7 +69,11 @@ clang::format::FormatStyle calculateQtcStyle() style.AlwaysBreakTemplateDeclarations = FormatStyle::BTDS_Yes; #endif style.BinPackArguments = false; +#if LLVM_VERSION_MAJOR >= 20 + style.BinPackParameters = FormatStyle::BPPS_OnePerLine; +#else style.BinPackParameters = false; +#endif style.BraceWrapping.AfterClass = true; style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never; style.BraceWrapping.AfterEnum = false;