[llvm-bugs] [Bug 45141] New: clang-format adds bogus linebreak when function arguments contain lambda

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 7 03:49:34 PST 2020


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

            Bug ID: 45141
           Summary: clang-format adds bogus linebreak when function
                    arguments contain lambda
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: realnc at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

clang-format is unable to correctly format code like this:

  func(0, [] {}, 0);

It will format it into:

  func(
      0, [] {}, 0);

Shortest example code that reproduces it:

  void f()
  {
      func(0, [] {}, 0);
  }

The clang-format invocation can be the simplest possible. Just "clang-format
test.cpp" without any .clang-format input file and no arguments.

-- 
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/20200307/3a5b4d8a/attachment.html>


More information about the llvm-bugs mailing list