[clang] [clang-format] Add KeepEmptyLines.AtEndOfBlock option (PR #224223)
Arkadiusz Bokowy via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 30 01:23:07 PDT 2026
================
@@ -170,6 +170,7 @@ TEST_F(FormatTest, RemovesEmptyLines) {
CustomStyle.BreakBeforeBraces = FormatStyle::BS_Custom;
CustomStyle.BraceWrapping.AfterNamespace = true;
CustomStyle.KeepEmptyLines.AtStartOfBlock = false;
+ CustomStyle.KeepEmptyLines.AtEndOfBlock = false;
----------------
arkq wrote:
> The presence suggests the executed test depends on that value.
I've removed my changes. Also, I've removed `KeepEmptyLines.AtStartOfBlock = false;` because it does not matter whether this is set to `true` or `false`. Unit test case passes in both cases. And indeed it tricked me into thinking that this particular unit test case check is for verifying removal of empty lines at block boundaries with custom configuration (so I've added `AtEndOfBlock` for completeness).
https://github.com/llvm/llvm-project/pull/224223
More information about the cfe-commits
mailing list