Author: sstwcw Date: 2024-06-30T02:04:44Z New Revision: aec7670b5d6354b63b011c9ed0632b70983b0328
URL: https://github.com/llvm/llvm-project/commit/aec7670b5d6354b63b011c9ed0632b70983b0328 DIFF: https://github.com/llvm/llvm-project/commit/aec7670b5d6354b63b011c9ed0632b70983b0328.diff LOG: [clangd] Revert the change concerning new lines See the comment. https://github.com/llvm/llvm-project/commit/2853a838d22b69f61ed376abbd9ab5e625111f44#r143690024 Added: Modified: clang-tools-extra/clangd/Format.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/Format.cpp b/clang-tools-extra/clangd/Format.cpp index f6fc72c1dd559..fc56a1c8c5030 100644 --- a/clang-tools-extra/clangd/Format.cpp +++ b/clang-tools-extra/clangd/Format.cpp @@ -281,11 +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.KeepEmptyLines = { - /*AtEndOfFile=*/true, - /*AtStartOfBlock=*/true, - /*AtStartOfFile=*/true, - }; + Style.KeepEmptyLines.AtStartOfBlock = true; } // Compute the code we want to format: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits