diff options
author | Robert Löhning <robert.loehning@qt.io> | 2022-10-19 10:49:14 +0200 |
---|---|---|
committer | Robert Löhning <robert.loehning@qt.io> | 2022-10-20 14:04:22 +0000 |
commit | e238c8f0a4caf3d1487205093cffee9f56b56516 (patch) | |
tree | 87765df43b8f2e2c7b722c75b58ec093424f38ca | |
parent | cf9b36a6c774eee851cdffbdd821a91587bae1f5 (diff) |
ClangFormat: Fix compilation with LLVM 15
Change-Id: I7990e8331c317d3bc363be610b2585d37dee4445
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
(cherry picked from commit a1bfcbf30d493e1e1fab94851fe50fed81cd3d6e)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | src/plugins/clangformat/clangformatutils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp index 230078558e..1e0429d80f 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -118,7 +118,11 @@ clang::format::FormatStyle qtcStyle() 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; |