[cfe-dev] [clang-format] Output not deterministic when for single-line comment
Duncan P. N. Exon Smith via cfe-dev
cfe-dev at lists.llvm.org
Tue May 15 20:11:19 PDT 2018
Seems like a bug to me. Rerunning clang-format shouldn't change the output.
> On May 14, 2018, at 16:53, Akhil Indurti via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>
> 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
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180515/1fa83fde/attachment.html>
More information about the cfe-dev
mailing list