[llvm-bugs] [Bug 40254] New: Sporadic incorrect white space difference flagged by clang-format

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 8 11:25:41 PST 2019


            Bug ID: 40254
           Summary: Sporadic incorrect white space difference flagged by
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hgreving at google.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Created attachment 21304
  --> https://bugs.llvm.org/attachment.cgi?id=21304&action=edit
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 git at github.com:DynamoRIO/dynamorio.git (or use https:// as in

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 @@


-/* clang-format on */
+        /* clang-format on */

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.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190108/f1e3b738/attachment.html>

More information about the llvm-bugs mailing list