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

            Bug ID: 40583
           Summary: clang-format toggles between two different formattings
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: fhoffm...@softwareparadies.de
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

Created attachment 21424
  --> https://bugs.llvm.org/attachment.cgi?id=21424&action=edit
minimized clang format files and source code examples

Clang toggles between two different formattings in some special cases.
This makes it impossible to use because there is no "correct" formatted code
any more.

example toggle1:

<     int maxH = ftoi((float)((aaaaaaaaaaa - iiiiiiiiiiiiiiiiii)
<                             / h)); // iiiiiiiiiiiiii llll     iiiii
aa.aa.aaaa aaaa iiiii pppp-1111
---
>     int maxH =
>         ftoi((float)((aaaaaaaaaaa - iiiiiiiiiiiiiiiiii)
>                      / h)); // iiiiiiiiiiiiii llll    iiiii aa.aa.aaaa aaaa 
> iiiii pppp-1111

I could not find one specific example which explains all the problems, so I
have attached 4.


My first Idea was that tabs are the only problem but then I discovered example
4, without any tabs.

I hope the examples will help to find the bug.

OS: Windows 10
clang-format version: 7.0.1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to