[clang] [clang-format] Add `AllowShortNamespacesOnASingleLine` option (PR #105597)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 30 00:54:23 PST 2024


================
@@ -616,6 +626,71 @@ class LineJoiner {
     return 1;
   }
 
+  unsigned tryMergeNamespace(SmallVectorImpl<AnnotatedLine *>::const_iterator I,
+                             SmallVectorImpl<AnnotatedLine *>::const_iterator E,
+                             unsigned Limit) {
+    if (Limit == 0)
+      return 0;
+    assert(I[1]);
----------------
owenca wrote:

```suggestion

    assert(I[1]);
```

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


More information about the cfe-commits mailing list