[PATCH] D98237: Option for empty lines after an access modifier.

Max Sagebaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 8 23:49:25 PST 2021


Max_S created this revision.
Max_S requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The current logic for access modifiers in classes ignores the option 'MaxEmptyLinesToKeep=1'. It is therefore impossible to have a coding style that requests one empty line after an access modifier. The patch allows the user to configure how many empty lines clang-format should add after an access modifier. This will remove lines if there are to many and will add them if there are missing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98237

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/include/clang/Format/Format.h
  clang/lib/Format/Format.cpp
  clang/lib/Format/UnwrappedLineFormatter.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98237.329225.patch
Type: text/x-patch
Size: 4306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210309/c307a7e7/attachment.bin>


More information about the cfe-commits mailing list