forked from qt-creator/qt-creator
clangformat: Fix build with LLVM 13
Change-Id: I5eaad17a6f240aa1e3f246492b69f093b4f59fee Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Björn Schäpers
parent
9d90efee8b
commit
14eb5b382c
@@ -42,7 +42,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
|
|||||||
ReplacementsToKeep replacementsToKeep)
|
ReplacementsToKeep replacementsToKeep)
|
||||||
{
|
{
|
||||||
style.MaxEmptyLinesToKeep = 100;
|
style.MaxEmptyLinesToKeep = 100;
|
||||||
|
#if LLVM_VERSION_MAJOR >= 13
|
||||||
|
style.SortIncludes = clang::format::FormatStyle::SI_Never;
|
||||||
|
#else
|
||||||
style.SortIncludes = false;
|
style.SortIncludes = false;
|
||||||
|
#endif
|
||||||
style.SortUsingDeclarations = false;
|
style.SortUsingDeclarations = false;
|
||||||
|
|
||||||
// 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.
|
||||||
|
@@ -145,7 +145,11 @@ static clang::format::FormatStyle qtcStyle()
|
|||||||
style.PenaltyReturnTypeOnItsOwnLine = 300;
|
style.PenaltyReturnTypeOnItsOwnLine = 300;
|
||||||
style.PointerAlignment = FormatStyle::PAS_Right;
|
style.PointerAlignment = FormatStyle::PAS_Right;
|
||||||
style.ReflowComments = false;
|
style.ReflowComments = false;
|
||||||
|
#ifdef LLVM_VERSION_MAJOR >= 13
|
||||||
|
style.SortIncludes = FormatStyle::SI_CaseSensitive;
|
||||||
|
#else
|
||||||
style.SortIncludes = true;
|
style.SortIncludes = true;
|
||||||
|
#endif
|
||||||
style.SortUsingDeclarations = true;
|
style.SortUsingDeclarations = true;
|
||||||
style.SpaceAfterCStyleCast = true;
|
style.SpaceAfterCStyleCast = true;
|
||||||
style.SpaceAfterTemplateKeyword = false;
|
style.SpaceAfterTemplateKeyword = false;
|
||||||
|
Reference in New Issue
Block a user