ClangFormat: Fix build with current LLVM main branch

Change-Id: I27b3fb41091aeeeda0bdb4786d8f1793beb0376f
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
Christian Kandeler
2024-07-01 12:08:13 +02:00
parent 2a313f45c9
commit f175ec933f

View File

@@ -113,7 +113,11 @@ clang::format::FormatStyle calculateQtcStyle()
style.IndentWrappedFunctionNames = false; style.IndentWrappedFunctionNames = false;
style.JavaScriptQuotes = FormatStyle::JSQS_Leave; style.JavaScriptQuotes = FormatStyle::JSQS_Leave;
style.JavaScriptWrapImports = true; style.JavaScriptWrapImports = true;
#if LLVM_VERSION_MAJOR >= 19
style.KeepEmptyLines = {false, false, false};
#else
style.KeepEmptyLinesAtTheStartOfBlocks = false; style.KeepEmptyLinesAtTheStartOfBlocks = false;
#endif
// Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between. // Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between.
style.MacroBlockBegin = ""; style.MacroBlockBegin = "";
style.MacroBlockEnd = ""; style.MacroBlockEnd = "";