[clang-format] Fix SeparateDefinitionBlocks issues
authorksyx <18738953+ksyx@users.noreply.github.com>
Wed, 5 Jan 2022 15:20:16 +0000 (10:20 -0500)
committerksyx <18738953+ksyx@users.noreply.github.com>
Tue, 11 Jan 2022 17:25:39 +0000 (12:25 -0500)
commitee25a327aac0eeae28f468a741b58ec7689de5f2
treee517d4affab58fcdab3bdaf820094cb7fbc784bd
parent8f553da4926146e9ed64adebdc360c00b1076770
[clang-format] Fix SeparateDefinitionBlocks issues

Fixes https://github.com/llvm/llvm-project/issues/52976.

- Make no formatting for macros
- Attach comment with definition headers
- Make no change on use of empty lines at block start/end
- Fix misrecognition of keyword namespace

Differential Revision: https://reviews.llvm.org/D116663
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, curdeius
clang/lib/Format/DefinitionBlockSeparator.cpp
clang/unittests/Format/DefinitionBlockSeparatorTest.cpp