<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Lambdas as the last argument of a function are indented too much if the function has many parameters"
   href="https://bugs.llvm.org/show_bug.cgi?id=41265">41265</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Lambdas as the last argument of a function are indented too much if the function has many parameters
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Formatter
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm-bugs@justinbogner.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The coding standards doc states to format lambdas like blocks as long as
they're the last arg:

 
<a href="http://www.llvm.org/docs/CodingStandards.html#format-lambdas-like-blocks-of-code">http://www.llvm.org/docs/CodingStandards.html#format-lambdas-like-blocks-of-code</a>

However, clang-format only seems to do that if the opening brace of the lambda
is on the same line as the start of the function call:

  some_call_to_a_function_with_a_long_name(arg1, arg2, [](int x) {
    int y = x * x;
    return y;
  });

vs

  some_call_to_a_function_with_a_long_name(long_arg1, really_long_arg2,
                                           [](int x) {
                                             int y = x * x;
                                             return y;
                                           });

The latter should really be:

  some_call_to_a_function_with_a_long_name(long_arg1, really_long_arg2,
                                           [](int x) {
    int y = x * x;
    return y;
  });</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>