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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] LambdaBodyIndentation for lambda as argument argument
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          timblechmann
      </td>
    </tr>
</table>

<pre>
    `LambdaBodyIndentation: OuterScope` can create funny alignment when lambda functions are not passed as arguments directly, but as arguments for arguments.

compare:
```
template < typename CB >
auto aaaaaaaaaaaaaaaaaaaa( int, CB cb )
{
    return cb();
}

template < typename CB >
auto b( CB cb )
{
    return cb;
}

void foo()
{
    // case 1
    aaaaaaaaaaaaaaaaaaaa( 0, [] {
        return 0;
    } );

    // case 2
    aaaaaaaaaaaaaaaaaaaa( 1, b( [] {
                              return 0;
                          } ) );
}
```

ideally it would be possible to align the argument to argument with regard to the scope of the outer function call, not the inner function call (case 2 indented as case 1) or possibly one indention level more (if case 1 has 8 spaces, case 2 could be indented by 12 spaces)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVM2OmzAQfhq4jDYyJhA4cNgkXalSpR76BAYGcGVshM2uePuOCWE3LauuhcDj-fuYmc-lqeciSNkP0Ze1OJP0XdeonXDS6CB-hp-Tw_FXZQYkK6iEhmpE4RCaSesZhJKt7skB3jrUoJYwXlf5ABbEiKCNg0FYizUIf9JO3sFCLUesnJoDfoFyco_Kxozv0iFg14A9396V6QcKS-DW05StzyI67AflAQbxBdw8oBY9wuVM8rebhZicAbGzAp6B1M7jIfuqhIDna47T-bYBWiO6aaQ6lGTvLeLz3ej6EecXgfgoX0z3SaJXI2uql1nh_Bsh4C_0UPMsQvR-_FkJmC9AkJyD5AoPcT6gYRuYJcHpCg-V2E3N_586WmbB7z7Lv792Ue2vFSvsd-5xlm5vWaNQagZJQ24mVUOJMBhrZakQ_Ch5DoDrcBvY5fS-f5OuI4CtGGt_7u2s5xOYZhGMZ9hGGSqVUr4KnjVeLbX-W03Ys1tFSevZemPW2l_6N-LOCnAGo3G18u4KX1FBb4iWFEQ2qxN05J-BHUSF1mdfw1f3_93ylDNEfDPMw7qI6zzOReikU1hQ2yoldPtE_O2F8y3cvVoWfq-3xQfeb5twGlXROTdYz_NliFqq41QeiP4kKPV6_zwNo_lNFwmJ0trJw3pJkhPLwq7IjzEmGJUpO_JTFuV1EzPkTZ0eG5Y2aRYqUaKyHnbAucY3WELQnpCHsuCMc5Zwcj9mET9UIsmiKi95nPLsdGTBkWEvpDp4HAcztuFYLJDKqbWkVNLS5bUp6Q6kScGlSj4-8b8zY-FkT5NUdb3QOlzyFwv-P3w5rco">