================ @@ -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; ---------------- dmasloff wrote:
I have not tested it yet, probably will add test about this in pr update, but since it's going later then all usings of `Style.MaxEmptyLinesToKeep` it overrides behavior of this option in namespaces, which seems reasonable. Could change it to `Newlines = std::min(2, Style.MaxEmptyLinesToKeep)` in `Leave` option if moving to proposed enum and existing`Newlines = 2` can be used for `Always`? https://github.com/llvm/llvm-project/pull/106145 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits