[clang] [clang-format] Use RemoveEmptyLinesInUnwrappedLines in clang-format s… (PR #113260)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 21 20:36:16 PDT 2024


https://github.com/owenca created https://github.com/llvm/llvm-project/pull/113260

…tyle

>From 572848cfbed9273c0087f691bbc336af8e9a34e6 Mon Sep 17 00:00:00 2001
From: Owen Pan <owenpiano at gmail.com>
Date: Mon, 21 Oct 2024 20:30:28 -0700
Subject: [PATCH] [clang-format] Use RemoveEmptyLinesInUnwrappedLines in
 clang-format style

---
 clang/lib/Format/Format.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index c612960ff37ac8..f85fe440f50a61 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1968,6 +1968,7 @@ FormatStyle getClangFormatStyle() {
   Style.IntegerLiteralSeparator.DecimalMinDigits = 5;
   Style.LineEnding = FormatStyle::LE_LF;
   Style.RemoveBracesLLVM = true;
+  Style.RemoveEmptyLinesInUnwrappedLines = true;
   Style.RemoveParentheses = FormatStyle::RPS_ReturnStatement;
   Style.RemoveSemicolon = true;
   return Style;



More information about the cfe-commits mailing list