<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/106456>106456</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format: Generalize `BAS_AlwaysBreak` to all delimiter pairs
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dabrahams
      </td>
    </tr>
</table>

<pre>
    For the most part clang-format uses [endline layout](https://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=printthread&Board=3&main=3062&type=thread) (finding authoritative references for the term on the web is hard; many point to [Code Complete by Steve McConnell](https://faculty.cs.byu.edu/~rodham/cs240/lecture-notes/Lecture-13-SoftwareImplementation/31-LayoutAndStyle.pdf); see page 16).

For C-like languages, the rule to avoid endline layout is simple:

On a given line, nothing other than a comment may follow an open delimiter (`{`, `(`, `[`, and sometimes `<`) whose matching close delimiter does not also fit on the same line.

Why does this matter? Kevlin Henney describes many of the problems with endline layout [here](https://photoshop.slack.com/archives/C4V7MGGQ7/p1724861552524839?thread_ts=1724791601.883329&cid=C4V7MGGQ7), although he doesn't call the problematic styles by that name. 

>From reading the documentation, the`BAS_AlwaysBreak` option fixes part of the problem, but there should be a way to apply this rule to all opening delimiters.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVMGu47YO_RplQ8Rw5NiJF17cJMi8h86gKC7QLge0RUfqyJIh0UndRb-9kJOZSYq7kS2JInkOD4kxmosjakR5EOVphRNrHxqFbUCNQ1y1Xs3N2QdgTTD4yDBiYOgsusu692FAhilSBFEeyClrHIHF2U8sypOQe808RlG8CXkW8tz7MA0xQ2uDn5zCif2AbLyLWecHIc9T295X1oFQxWzUoyiW4-I0BuP4fiFkdfAYlChOhZDVgMal37ySQlY8jySK03fLGoTc98Yp4y5wB2gY2VwJAvUUyHUUoX9gZAoDeLf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