[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 28 11:28:40 PDT 2024
================
@@ -1493,6 +1511,18 @@ static auto computeNewlines(const AnnotatedLine &Line,
Newlines = 1;
}
+ // Insert empty line after "{" that opens namespace scope
+ if (Style.WrapNamespaceBodyWithNewlines &&
+ LineStartsNamespaceScope(&Line, PreviousLine, PrevPrevLine)) {
+ Newlines = 2;
----------------
HazardyKnusperkeks wrote:
I think may empty lines will always set the upper bound, and your option the lower bound.
https://github.com/llvm/llvm-project/pull/106145
More information about the cfe-commits
mailing list