ClangFormat: Fix build for LLVM 15.0.0

This fixes the CMake build of Qt Creator against LLVM 15.0.0

Change-Id: Icecd45821091c8c2b565246cb17ce5a6e5c49f36
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Cristian Adam
2022-08-16 21:04:39 +02:00
parent 5a8d7c3d51
commit c7cdd55dea
2 changed files with 4 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ add_qtc_plugin(ClangFormat
clangformatplugin.cpp clangformatplugin.h
clangformatsettings.cpp clangformatsettings.h
clangformatutils.cpp clangformatutils.h
EXPLICIT_MOC
clangformatconfigwidget.cpp clangformatconfigwidget.h
)
if(TARGET ClangFormat)

View File

@@ -118,7 +118,9 @@ clang::format::FormatStyle qtcStyle()
style.ColumnLimit = 100;
style.CommentPragmas = "^ IWYU pragma:";
style.CompactNamespaces = false;
#if LLVM_VERSION_MAJOR < 15
style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
#endif
style.ConstructorInitializerIndentWidth = 4;
style.ContinuationIndentWidth = 4;
style.Cpp11BracedListStyle = true;