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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          manuel-arguelles
      </td>
    </tr>
</table>

<pre>
    It seems that BreakInheritanceList depends of ColumnLimit in an unclear way, tested with clang-format-17 on linux, for example for the code:

```
class A : public B, private C
{
}
```

with the configuration:

```
ColumnLimit: 0
BreakInheritanceList: BeforeComma
TabWidth: 2
IndentWidth: 2
ConstructorInitializerIndentWidth: 0
```

I get:

```
class A : public B
, private C {
}
```

With the configuration (ColumnLimit > 0):

```
ColumnLimit: 80
BreakInheritanceList: BeforeComma
TabWidth: 2
IndentWidth: 2
ConstructorInitializerIndentWidth: 0
```

Returns:

```
class A
: public B
, private C {}
```

Ideally with `ColumnLimit: 0` it shouldn't break the line, and if so, at least break it BeforeComma as described in the documentation: `BILS_BeforeComma (in configuration: BeforeComma) Break inheritance list before the colon and commas, and align the commas with the colon.`

Ideally what I'd like to get is that if everything is in one line, don't touch it (ColumnLimit: 0), but if not, then format it according to BeforeComma: break before the colon and commas, or place everything in one line, is this possible?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMlc2O4zYMx59GuRAJHDlfPvgwyTRAgDm1BfZYyBJjsytLgUTN7vTpC9kOJtmZTqc9LRA4Nk1Sf_8oUipGah1iLdZ7sX6cqcSdD3WvXEI7V6FNaC3GWePNS31iiIh9BO4Uwz6g-npyHQZi5TQ-UWQweEFnIvgzHLxNvXuinhjIgXKQnLaoAnxTL0IegDEyGvhG3IG2yrXzsw-94vlyC96BJZe-Z7-zD4DfVX-xONxzh6C9QVE-iOJRFNfrpph-w6O2KkZ4AFE-wCU1ljTsc7ZLoGfFCIcparu_3jy-m2e8DiLHhd2Z2hQUk3cfK7gBkEVM1vew5dd7PPuAB9_3anT8XTVfyHCXX8rRdHIGHf9oPXgXOSTNPpwcMSlLf2H4wbf44ONO0CL_D5qj4y1T-CTOL-_iBCF3t7tGlL9AIWT1nzDvfl7OvyKn4OKnSE_vPoH7Q9Ang8ral7HJxKZ4syc3BRBD7Hyyxgm5ZWgyuKE4lhzm9ZQzQGeIfnhgsKji1Y_4liioCAajDtSgyV2f0xivU4-Ory2TdexPT7_9cRso5I7cm-66q5asxpkD9FpVsHnqNIPXtKGsd4NinYPiVb-y1LrJI9vhpqOtd4t_4pYn3UnIrQFLXxHY514BmmYgnQGfMbxwR67NVnLg3Ss540em7JPuMqv7HT6WQFbZtUlDOud5mI0dOhjHYQ5TWvtg8hrs75iUD1Md_gWBD3CxSuOd3HutwzdRhIuPkRqLojzOTF2aqqzUDOvlZldsVuu1rGZdXaw2Wi9lpeVypRqzqfRupXC3NQUupTJmRrUsZFmsipVcrneraqGqRp43hZLLsmzkrhGrAntFdmHtc7_woZ1RjAnrzbIqdzOrGrTxeiiFOjvNm9RGsSpyxeNrGBPb4fi6PULE-hFmKdi6Y74MDSePQh5b4i41C-17IY85w_Q3vwT_J2oW8jioiEIeByF_BwAA__8QYDOo">