[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 28 04:31:11 PST 2021


curdeius requested changes to this revision.
curdeius added a comment.
This revision now requires changes to proceed.

Thanks for working on this.
Please add unit tests that verify the expected behaviour. Keep them simple. You can inspire yourself from existing tests.



================
Comment at: clang/docs/ClangFormatStyleOptions.rst:3398
 
+**SeparateDefinitionBlocks** (``SeparateDefinitionStyle``) :versionbadge:`clang-format 15`
+  Specifies the use of empty lines to separate definition blocks, including classes,
----------------
Unless it takes a lot of time to review this patch 🙂


================
Comment at: clang/lib/Format/Format.cpp:2027
+// namespaces by inserting a line break between them.
+class DefinitionBlockSeparator : public TokenAnalyzer {
+public:
----------------
Please consider moving it to a different file.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116314/new/

https://reviews.llvm.org/D116314



More information about the cfe-commits mailing list