diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp index 7beb062a45e..9e3444b2475 100644 --- a/src/plugins/clangformat/clangformatutils.cpp +++ b/src/plugins/clangformat/clangformatutils.cpp @@ -113,7 +113,11 @@ clang::format::FormatStyle calculateQtcStyle() style.IndentWrappedFunctionNames = false; style.JavaScriptQuotes = FormatStyle::JSQS_Leave; style.JavaScriptWrapImports = true; +#if LLVM_VERSION_MAJOR >= 19 + style.KeepEmptyLines = {false, false, false}; +#else style.KeepEmptyLinesAtTheStartOfBlocks = false; +#endif // Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between. style.MacroBlockBegin = ""; style.MacroBlockEnd = "";