[all-commits] [llvm/llvm-project] a0868d: [clang-format] Add KeepEmptyLines.AtEndOfBlock opt...

Arkadiusz Bokowy via All-commits all-commits at lists.llvm.org
Wed Sep 30 13:27:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0868d59ea99e56ddc60288878b63068af650ab1
      https://github.com/llvm/llvm-project/commit/a0868d59ea99e56ddc60288878b63068af650ab1
  Author: Arkadiusz Bokowy <arkadiusz.bokowy at gmail.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.md
    M clang/docs/ReleaseNotes.md
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/lib/Format/Format.cpp
    M clang/lib/Format/UnwrappedLineFormatter.cpp
    M clang/unittests/Format/ConfigParseTest.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Add KeepEmptyLines.AtEndOfBlock option (#224223)

Add support for the AtEndOfBlock option in KeepEmptyLines configuration,
which controls whether empty lines are preserved before closing braces.
This feature works in pair with AtStartOfBlock for control of empty
lines at the beginning and end of blocks.

The default is false, which should maintain backward compatibility by
removing empty lines before closing braces. When set to true, empty
lines before closing braces are preserved respecting MaxEmptyLinesToKeep
limit.

Closes #22073 and #171003



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list