[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 8 18:47:14 PST 2025


================
@@ -660,17 +672,18 @@ class LineJoiner {
 
       assert(Limit >= L1.Last->TotalLength + 3);
       const auto InnerLimit = Limit - L1.Last->TotalLength - 3;
-      const auto MergedLines = tryMergeNamespace(I + 1, E, InnerLimit);
+      const auto MergedLines =
+          tryMergeNamespace(BraceOpenLine + 1, E, InnerLimit, OpenBraceWrapped);
----------------
owenca wrote:

```suggestion
          tryMergeNamespace(BraceOpenLine + 1, E, InnerLimit);
```

https://github.com/llvm/llvm-project/pull/123010


More information about the cfe-commits mailing list