forked from qt-creator/qt-creator
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:
@@ -13,6 +13,8 @@ add_qtc_plugin(ClangFormat
|
|||||||
clangformatplugin.cpp clangformatplugin.h
|
clangformatplugin.cpp clangformatplugin.h
|
||||||
clangformatsettings.cpp clangformatsettings.h
|
clangformatsettings.cpp clangformatsettings.h
|
||||||
clangformatutils.cpp clangformatutils.h
|
clangformatutils.cpp clangformatutils.h
|
||||||
|
EXPLICIT_MOC
|
||||||
|
clangformatconfigwidget.cpp clangformatconfigwidget.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(TARGET ClangFormat)
|
if(TARGET ClangFormat)
|
||||||
|
@@ -118,7 +118,9 @@ clang::format::FormatStyle qtcStyle()
|
|||||||
style.ColumnLimit = 100;
|
style.ColumnLimit = 100;
|
||||||
style.CommentPragmas = "^ IWYU pragma:";
|
style.CommentPragmas = "^ IWYU pragma:";
|
||||||
style.CompactNamespaces = false;
|
style.CompactNamespaces = false;
|
||||||
|
#if LLVM_VERSION_MAJOR < 15
|
||||||
style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
|
style.ConstructorInitializerAllOnOneLineOrOnePerLine = false;
|
||||||
|
#endif
|
||||||
style.ConstructorInitializerIndentWidth = 4;
|
style.ConstructorInitializerIndentWidth = 4;
|
||||||
style.ContinuationIndentWidth = 4;
|
style.ContinuationIndentWidth = 4;
|
||||||
style.Cpp11BracedListStyle = true;
|
style.Cpp11BracedListStyle = true;
|
||||||
|
Reference in New Issue
Block a user