forked from qt-creator/qt-creator
ClangFormat: Adapt to changes in LLVM 16
Change-Id: Ia4a2cf21e351095609d8858f1f9355c6607470f3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -38,7 +38,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
|
|||||||
#else
|
#else
|
||||||
style.SortIncludes = false;
|
style.SortIncludes = false;
|
||||||
#endif
|
#endif
|
||||||
|
#if LLVM_VERSION_MAJOR >= 16
|
||||||
|
style.SortUsingDeclarations = clang::format::FormatStyle::SUD_Never;
|
||||||
|
#else
|
||||||
style.SortUsingDeclarations = false;
|
style.SortUsingDeclarations = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
// This is a separate pass, don't do it unless it's the full formatting.
|
// This is a separate pass, don't do it unless it's the full formatting.
|
||||||
style.FixNamespaceComments = false;
|
style.FixNamespaceComments = false;
|
||||||
|
|||||||
@@ -151,7 +151,11 @@ clang::format::FormatStyle qtcStyle()
|
|||||||
#else
|
#else
|
||||||
style.SortIncludes = true;
|
style.SortIncludes = true;
|
||||||
#endif
|
#endif
|
||||||
|
#if LLVM_VERSION_MAJOR >= 16
|
||||||
|
style.SortUsingDeclarations = FormatStyle::SUD_Lexicographic;
|
||||||
|
#else
|
||||||
style.SortUsingDeclarations = true;
|
style.SortUsingDeclarations = true;
|
||||||
|
#endif
|
||||||
style.SpaceAfterCStyleCast = true;
|
style.SpaceAfterCStyleCast = true;
|
||||||
style.SpaceAfterTemplateKeyword = false;
|
style.SpaceAfterTemplateKeyword = false;
|
||||||
style.SpaceBeforeAssignmentOperators = true;
|
style.SpaceBeforeAssignmentOperators = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user