<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 - AlignConsecutiveAssignments interferes with UseTab: ForIndentation (indents with spaces instead)"
   href="https://bugs.llvm.org/show_bug.cgi?id=37919">37919</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AlignConsecutiveAssignments interferes with UseTab: ForIndentation (indents with spaces instead)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>sami@boukortt.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>Created <span class=""><a href="attachment.cgi?id=20463" name="attach_20463" title="The expected output for the aforementioned input (and for itself).">attachment 20463</a> <a href="attachment.cgi?id=20463&action=edit" title="The expected output for the aforementioned input (and for itself).">[details]</a></span>
The expected output for the aforementioned input (and for itself).

With this .clang-format:

    TabWidth: 2
    IndentWidth: 2
    ContinuationIndentWidth: 2
    UseTab: ForIndentation
    AlignConsecutiveAssignments: true
    ColumnLimit: 0

and this input:

    int main() {
            const int a_long_name = 42;

            const auto f = [](const int n) {
                    return n + 1;
            };
    }

clang-format produces the expected output, indented with tabs (here printed
with width 8):

    int main() {
    |------>const int a_long_name = 42;

    |------>const auto f = [](const int n) {
    |------>|------>return n + 1;
    |------>};
    }

However, if the blank line between the two variables is removed so that their
assignments are aligned, then the body of the lambda expression is indented
with spaces instead. It is not obvious if the code is rendered with tabs of
width 2, but with 8-column-wide tabs, it looks like this:

    int main() {
    |------>const int a_long_name = 42;
    |------>const auto f          = [](const int n) {
    ····return n + 1;
    |------>};
    }</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>