[llvm-bugs] [Bug 42164] New: Clang-format Add Option to Wrap before While

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 6 08:15:39 PDT 2019


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

            Bug ID: 42164
           Summary: Clang-format Add Option to Wrap before While
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: matthias.schaefer at versasec.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Similar to BeforeCatch and BeforeElse, I would like to be able to control the
breaking before "while" in do-while loops.

I propose to add a BeforeWhile flag to the BraceWrapping setting, where true
means to break before the "while", and false means to remove the wrapping,
false should be the default because this seems to be how it is done currently.
When using BreakBeforeBraces: Stroustrup or Allman, there should always be a
break before "while".

-- 
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/20190606/8fb32ab6/attachment.html>


More information about the llvm-bugs mailing list