diff options
author | Björn Schäpers <bjoern@hazardy.de> | 2023-08-02 12:39:13 +0200 |
---|---|---|
committer | Björn Schäpers <qt-codereview@hazardy.de> | 2023-08-03 09:55:35 +0000 |
commit | 9ad9e49ccf6e0d7f4ba5765cff3af63fbbed60e8 (patch) | |
tree | 6eee92b0efee5fca80747349c597054618797374 | |
parent | 1f7960efe65c284cb954dc8b8e6b72f807b15a3c (diff) |
clang-format: Fix build with LLVM 17
Change-Id: Ie6377be3be4a8c785d53f1eceabcc4811db4229d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/plugins/clangformat/clangformatutils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp index 928d30d241..1aae91a186 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -161,7 +161,9 @@ clang::format::FormatStyle qtcStyle() style.SpaceAfterTemplateKeyword = false; style.SpaceBeforeAssignmentOperators = true; style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements; +#if LLVM_VERSION_MAJOR < 17 style.SpaceInEmptyParentheses = false; +#endif style.SpacesBeforeTrailingComments = 1; #if LLVM_VERSION_MAJOR >= 13 style.SpacesInAngles = FormatStyle::SIAS_Never; @@ -169,8 +171,12 @@ clang::format::FormatStyle qtcStyle() style.SpacesInAngles = false; #endif style.SpacesInContainerLiterals = false; +#if LLVM_VERSION_MAJOR >= 17 + style.SpacesInParens = FormatStyle::SIPO_Never; +#else style.SpacesInCStyleCastParentheses = false; style.SpacesInParentheses = false; +#endif style.SpacesInSquareBrackets = false; addQtcStatementMacros(style); style.Standard = FormatStyle::LS_Cpp11; |