Issue 141575
Summary [clang-format] Lambda hanging indent increased by moving to a new line
Labels clang-format
Assignees
Reporter rmarker
    There is behaviour to minimise the hanging indent with lambdas by moving them to a new line.
However, this can inadvertently increase the amount of hanging indent in particular circumstances.

For example, the following code with `-style="{BreakBeforeBraces: Allman, AllowShortLambdasOnASingleLine: false, ContinuationIndentWidth: 8}"`
```cpp
if (
        []()
        {
 return true;
        }())
{
}

fun(
        []()
        {
 return 17;
        });
```

Expected:
```cpp
if ([]()
    {
 return true;
    }())
{
}

fun([]()
    {
      return 17;
 });
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to