<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 - Sporadic incorrect white space difference flagged by clang-format"
   href="https://bugs.llvm.org/show_bug.cgi?id=40254">40254</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Sporadic incorrect white space difference flagged by clang-format
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>hgreving@google.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=21304" name="attach_21304" title="patch.diff to reproduce">attachment 21304</a> <a href="attachment.cgi?id=21304&action=edit" title="patch.diff to reproduce">[details]</a></span>
patch.diff to reproduce

I haven't been able to get a small reproducer, the error seems to happen
sometimes dependent on random line changes. Easiest way is (all open source):

1) git clone <a href="mailto:git@github.com">git@github.com</a>:DynamoRIO/dynamorio.git (or use https:// as in
<a href="https://github.com/DynamoRIO/dynamorio">https://github.com/DynamoRIO/dynamorio</a>)

2) Go to revision git checkout 425413dbf134a46ae7a43d59b683ab350d72a85b

3) git apply patch.diff

4) git diff | ./clang-format-diff.py -p1
--- suite/tests/client-interface/mangle_suspend.c       (before formatting)
+++ suite/tests/client-interface/mangle_suspend.c       (after formatting)
@@ -288,5 +288,5 @@

 END_FILE

-/* clang-format on */
-#endif
+        /* clang-format on */
+#endif

The problem is the random white space in "after formatting" that sometimes
seems to happen dependent on random line changes. I have not been able to find
a deterministic way, in particular a smaller example to reproduce other than
this one.</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>