[llvm-bugs] [Bug 37478] New: Output not deterministic when run with a multi-line comment on a single line

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 15 16:04:15 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37478

            Bug ID: 37478
           Summary: Output not deterministic when run with a multi-line
                    comment on a single line
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: aindurti at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Running clang-format on its own output results in a different output for
the following example. Is this expected behavior? The example has a
multi-line comment on a single line of a function body.

$ clang-format -version
clang-format version 7.0.0 (tags/google/stable/2018-01-11)

$ cat foo.c
void foo() {
/* THIS IS A COMMENT */
}

$ clang-format foo.c > foo2.c
$ cat foo2.c
void foo() { /* THIS IS A COMMENT */ }

$ clang-format foo2.c > foo3.c
$ cat foo3.c
void foo() { /* THIS IS A COMMENT */
}

Thank You,
Akhil Indurti

-- 
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/20180515/b0b57046/attachment.html>


More information about the llvm-bugs mailing list