From 4c91b49bab0728d4bc136aa33c4aeb4e8ea37d01 Mon Sep 17 00:00:00 2001 From: Jie Fu Date: Tue, 25 Jun 2024 14:51:57 +0800 Subject: [PATCH] [clangd] Fix the build broken (NFC) /llvm-project/clang-tools-extra/clangd/Format.cpp:284:11: error: no member named 'KeepEmptyLinesAtTheStartOfBlocks' in 'clang::format::FormatStyle' Style.KeepEmptyLinesAtTheStartOfBlocks = true; ~~~~~ ^ 1 error generated. --- clang-tools-extra/clangd/Format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/Format.cpp b/clang-tools-extra/clangd/Format.cpp index 272a34d4ed79..fc56a1c8c503 100644 --- a/clang-tools-extra/clangd/Format.cpp +++ b/clang-tools-extra/clangd/Format.cpp @@ -281,7 +281,7 @@ formatIncremental(llvm::StringRef OriginalCode, unsigned OriginalCursor, // Never *remove* lines in response to pressing enter! This annoys users. if (InsertedText == "\n") { Style.MaxEmptyLinesToKeep = 1000; - Style.KeepEmptyLinesAtTheStartOfBlocks = true; + Style.KeepEmptyLines.AtStartOfBlock = true; } // Compute the code we want to format: