[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 11:06:05 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:
How does this play with `MaxEmptyLinesToKeep `?
https://github.com/llvm/llvm-project/pull/106145
More information about the cfe-commits
mailing list