forked from qt-creator/qt-creator
clang-format: Fix build with LLVM 17
Change-Id: Ie6377be3be4a8c785d53f1eceabcc4811db4229d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Björn Schäpers
parent
1f7960efe6
commit
9ad9e49ccf
@@ -161,7 +161,9 @@ clang::format::FormatStyle qtcStyle()
|
|||||||
style.SpaceAfterTemplateKeyword = false;
|
style.SpaceAfterTemplateKeyword = false;
|
||||||
style.SpaceBeforeAssignmentOperators = true;
|
style.SpaceBeforeAssignmentOperators = true;
|
||||||
style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements;
|
style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements;
|
||||||
|
#if LLVM_VERSION_MAJOR < 17
|
||||||
style.SpaceInEmptyParentheses = false;
|
style.SpaceInEmptyParentheses = false;
|
||||||
|
#endif
|
||||||
style.SpacesBeforeTrailingComments = 1;
|
style.SpacesBeforeTrailingComments = 1;
|
||||||
#if LLVM_VERSION_MAJOR >= 13
|
#if LLVM_VERSION_MAJOR >= 13
|
||||||
style.SpacesInAngles = FormatStyle::SIAS_Never;
|
style.SpacesInAngles = FormatStyle::SIAS_Never;
|
||||||
@@ -169,8 +171,12 @@ clang::format::FormatStyle qtcStyle()
|
|||||||
style.SpacesInAngles = false;
|
style.SpacesInAngles = false;
|
||||||
#endif
|
#endif
|
||||||
style.SpacesInContainerLiterals = false;
|
style.SpacesInContainerLiterals = false;
|
||||||
|
#if LLVM_VERSION_MAJOR >= 17
|
||||||
|
style.SpacesInParens = FormatStyle::SIPO_Never;
|
||||||
|
#else
|
||||||
style.SpacesInCStyleCastParentheses = false;
|
style.SpacesInCStyleCastParentheses = false;
|
||||||
style.SpacesInParentheses = false;
|
style.SpacesInParentheses = false;
|
||||||
|
#endif
|
||||||
style.SpacesInSquareBrackets = false;
|
style.SpacesInSquareBrackets = false;
|
||||||
addQtcStatementMacros(style);
|
addQtcStatementMacros(style);
|
||||||
style.Standard = FormatStyle::LS_Cpp11;
|
style.Standard = FormatStyle::LS_Cpp11;
|
||||||
|
Reference in New Issue
Block a user