<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Formatting is not idempotent with 'MaxEmptyLinesToKeep' being 0"
   href="https://llvm.org/bugs/show_bug.cgi?id=25971">25971</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Formatting is not idempotent with 'MaxEmptyLinesToKeep' being 0
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>llvm@Alexander.Shukaev.name
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15535" name="attach_15535" title="Test C++ code for formatting">attachment 15535</a> <a href="attachment.cgi?id=15535&action=edit" title="Test C++ code for formatting">[details]</a></span>
Test C++ code for formatting

1.  $ clang-format -dump-config -style=LLVM | sed
's/\(MaxEmptyLinesToKeep\s*:\s*\).*/\10/g' > .clang-format
2.  $ clang-format test.cpp
3.  $ clang-format test.cpp | clang-format
4.  $ clang-format test.cpp | clang-format | clang-format
5.  $ clang-format test.cpp | clang-format | clang-format | clang-format

Notice how the output of #2 is identical to #4, while #3 is identical to #5,
and the difference between those two variants is the added/removed empty line
before 'private:'.  That is this interleaving pattern of adding/removing this
empty line will repeat infinitely.</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>