[llvm-bugs] [Bug 37773] New: clang-format breaks code

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 11 12:57:45 PDT 2018


            Bug ID: 37773
           Summary: clang-format breaks code
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: adi at thingdust.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Created attachment 20417
  --> https://bugs.llvm.org/attachment.cgi?id=20417&action=edit
file before it was formatted

Hi all

I just found out, that clang-format breaks my code in my configuration (I
formatted a previously non-clang-formatted file).

I did not found out which configuration actually triggers the bug. The standard
configurations (WebKit, Google, etc. do not trigger the bug). My configuration
is based on WebKit.

This is a minimal example triggering the bug:

It seems that the comment at the end of the function definition somehow
confuses clang-format.

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/20180611/3c9c5bad/attachment.html>

More information about the llvm-bugs mailing list