]>
Commit | Line | Data |
---|---|---|
99af3ed4 JP |
1 | From e238c8f0a4caf3d1487205093cffee9f56b56516 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Robert=20L=C3=B6hning?= <robert.loehning@qt.io> | |
3 | Date: Wed, 19 Oct 2022 10:49:14 +0200 | |
4 | Subject: ClangFormat: Fix compilation with LLVM 15 | |
5 | ||
6 | Change-Id: I7990e8331c317d3bc363be610b2585d37dee4445 | |
7 | Reviewed-by: <github-actions-qt-creator@cristianadam.eu> | |
8 | Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> | |
9 | (cherry picked from commit a1bfcbf30d493e1e1fab94851fe50fed81cd3d6e) | |
10 | Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> | |
11 | Reviewed-by: Eike Ziller <eike.ziller@qt.io> | |
12 | --- | |
13 | src/plugins/clangformat/clangformatutils.cpp | 4 ++++ | |
14 | 1 file changed, 4 insertions(+) | |
15 | ||
16 | diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp | |
17 | index 230078558e..1e0429d80f 100644 | |
18 | --- a/src/plugins/clangformat/clangformatutils.cpp | |
19 | +++ b/src/plugins/clangformat/clangformatutils.cpp | |
20 | @@ -118,7 +118,11 @@ clang::format::FormatStyle qtcStyle() | |
21 | style.ColumnLimit = 100; | |
22 | style.CommentPragmas = "^ IWYU pragma:"; | |
23 | style.CompactNamespaces = false; | |
24 | +#if LLVM_VERSION_MAJOR >= 15 | |
25 | + style.PackConstructorInitializers = FormatStyle::PCIS_BinPack; | |
26 | +#else | |
27 | style.ConstructorInitializerAllOnOneLineOrOnePerLine = false; | |
28 | +#endif | |
29 | style.ConstructorInitializerIndentWidth = 4; | |
30 | style.ContinuationIndentWidth = 4; | |
31 | style.Cpp11BracedListStyle = true; | |
32 | -- | |
33 | cgit v1.2.1 | |
34 |