<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69917>69917</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
AllowShortFunctionsOnASingleLine: InlineOnly and ColumnLimit: 0 behaves weirdly.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tru
</td>
</tr>
</table>
<pre>
This code:
```
class A {
int GetVal1() const { return m_Val1; }
int GetVal2() const { return m_Val2; }
};
```
Change the `.clang-format` to this:
```
AllowShortFunctionsOnASingleLine: InlineOnly
ColumnLimit: 0
```
and the result is:
```
class A {
int GetVal1() const { return m_Val1; }
int GetVal2() const {
return m_Val2;
}
};
```
If you set `ColumnLimit: 120` it will reproduce the expected first result.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8U01v2zAM_TXyhaghy4k_Dj4kKzwUKNBDh10H2WJsDbIUSFS7_PtBToKi3ZBtlwG2_EE96vHxUYagJ4vYse2ebe8zGWl2viMfs8GpU_dl1gFGp5CVO8bvGb-uFb9c6-doZAiwA1bvzz8AtCX4jPRVmoKJhokWRmcDpS3gkaK3sHxbo-UeWH1_wb3BxE2YeAdLL-X-t9TO66dZ2gmBZgRW8Xw00k53B-cXSaziQA5o1uF2kTtj3Ovz7Dz10Y6knQ1Pdves7WTwUdskETxYoy0-WXO6nOtMXOyjXjSlML9BUVq18vMYoiH4E5v_Ivk1M_yi_TXy9y14OMDJRQhIqQUfhClE2g6a4FUbAx6P3qk4njuGP444Eio4aB_oIlCeqa5UbdnKDLuiahte8U3TZHO3bYcBm0K1xUZJHAYshKzGYmyUrJUc6kx3gouySHchGt7km-1BodpWddmWragGtuG4SG1yY16W3Pkp0yFE7Kq2LerMyAFNWCdGiHdOEiLNkO8S7G6IU2AbbnSg8JaINBns_s1KkKzx0Ukw4CxfMMAraq_MKc-iN91MdFyNI3om-knTHId8dAsTfaJwedwdvfuOIzHRr4UFJvq1tp8BAAD__zMbMqM">