<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57200>57200</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Short functions within macro regression in 15.x prerelease
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JohnC32
</td>
</tr>
</table>
<pre>
Given:
```c++
#define Foo(ArgType, SetName) \
void Bar::set##SetName(ArgType a##SetName) { \
f##SetName = std::move(a##SetName); \
}
```
and `_clang-format`:
```yaml
---
BasedOnStyle: Google
ColumnLimit: 100
IndentWidth: 4
AllowShortFunctionsOnASingleLine: Empty
...
```
clang-format 13 and 14 yield the expect result (above). However, clang-format 15.x prerelease (commit 64260fe on Aug-17-2022)
does not honor `AllowShortFunctionsOnASingleLine: Empty` and produces:
```c++
#define Foo(ArgType, SetName) \
void Bar::set##SetName(ArgType a##SetName) { f##SetName = std::move(a##SetName); }
```
Interestingly if you remove the ColumnLimit from _clang-format, clang-format 15.x prerelease behaves correctly.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytUttunDAQ_Rp4GS0Cc1seeNhLN00VNQ9bqY-VwQZcGXtlzG74-44habNpmlZVLAvGM_aZyzmVZlN5I85cefHGC_de-PTNwmXXHtm6vXhJzHgjFIeD1h5Zb0z7ZTpxj-zgyO1n2qNZwCvLS3cLgjuctWCwpcaljDcDtwiL-yfCEyzQF4ECvHx7jeVWc3UNvHgPg2ULeq_PDvE3JC_evlKZl-9ftP98JlQxQNe3WlLVrhptemrdlT9MbqK9XFyr1WoxtnTg7F4d7SQ5PoMbrVu05thOy7FXd6IX1oWi8DH3rWJc2a-C2c75k8W7kVJfjp029jCq2gqthnu1OQqFeHdIkLv6oT_ZabkeBMEbjT1vCKIYXKNRApPgkoHtOPCHE68tGD6M0oKbZzXPtQjgo77wMzdOAtcwafAAJ8MNlxy7do9q3WNzkCUkCxsOWsFmbFdRviIhIY6TuRim-QBKW-i00sYN_N97zcK59pPRbKz58I6afk8B_69e31bnrbI47MG6sUwgGpj0iIw5wJnDZ_qCxugernX8N_4q3tEzMlNrY1ALcnoUlM_LKMvCPIvygvisjFkRF9S3wkpezqRB88QaXITthIKe1kZjbS3WO2AA0Pcinz8aWXbWnmYSyQF3i4_HKkAV4UHK89NvhXR_x5LwKIZhRNrJIc1JGPpdGafritWE03pNaZRXdZIUUV2hUTVp0qx9SSsuh9JLURBE8QvMEGh76d4XpVNmuI7yaJ3EURTEcVTRuEmrmDRFwjIvCXlPhQxcHYE2rW_KuaRqbAcMSjHY4VeQYret4nxOh_h0tDig8pPu1C4m_py6nEv_Ae_opfo">