<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81845>81845</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] BraceWrapping.BeforeLambdaBody can fail to apply when AllowShortLambdasOnASingleLine is enabled
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rmarker
</td>
</tr>
</table>
<pre>
With the following style:
```
ColumnLimit: 30
BreakBeforeBraces: Allman
AllowShortLambdasOnASingleLine: All
```
The following code can be misformatted with the lambda body brace not being wrapped.
(This doesn't occur when `AllowShortLambdasOnASingleLine` is `None`)
Input:
```cpp
void f()
{
std::for_each(
c.begin(), c.end(),
[](const auto &Item)
{
LongFunctionName(
Item);
});
}
```
Output:
```cpp
void f()
{
std::for_each(
c.begin(), c.end(),
[](const auto &Item) {
LongFunctionName(
Item);
});
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VM1u4yAQfhp8QbUI-PfgQ9IoUqWoPbRSjysME5stBgtwo779CttpU2nbPezuyMIemH_zfdx71RmABuU7lO8TPoXeusYN3L2AS1or35pnFXocesAnq7U9K9NhH940ILZFZI_IZS3I-szqrdXTYI5qUAGxLWbr9s4Bf9nByTrYOS7Ax8Ot1gM3i8E25njsrQtHPrSS-wezfVSm03BUBlbr32Zc1qdPhQorAQtucAt4UP5k3cBDAInPl6b0nAXHTnEbK8LGBtxC9D47Po4g0zU-rZ565bG04A2iZcBWiMnhcw8Go4L8ofKCYOWj3b2dNUTr67rvzDiFr0YqxnHZebVK4hOi1Yd3uVs-MPZBxgBse7LuB3DRR7vlTKQtdMqsjvQWixSMfFcvEaIsNwHRSljjA-ZTsBjR4i7A8J50tXxPfbSmO0xGBGXNPR_gI_GVXCKwixcq99d6VL_-rw9T-NsBfTOfWf7ZkK4ms8p_GlAiGyZrVvMEmk1Jyrouq6xM-qYWOWMlIzQrGa0qCbze5KJkhBR5RgVJVEMJzQjd5JtNTrIyZeWmKERVsDYnlcwJyggMXOlU69chta5LlPcTNNWmyvJE8xa0n1mDUqG56W4WbCFKI4-4JrrdtFPnUUa08sF_BAoq6JlxPjnmezwzwnMEnTJdurDEgqVdhGfE8YkrjYPFfBz12wK973EXQQeGtxpkMjnd9CGMkXQQPSB66FTopzYVdkD0EAtcXzejsz9BBEQPc9se0cPc-a8AAAD__9ZjfHw">