[llvm-bugs] [Bug 51804] New: Indenting is off for function arguments following a multi-line lambda function argument

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 9 03:31:51 PDT 2021


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

            Bug ID: 51804
           Summary: Indenting is off for function arguments following a
                    multi-line lambda function argument
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mario at emmenlauer.de
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

I'm having problems with the formatting _after_ a multi-line lambda function
argument. The original formatting is in the `clang-format off` block, and
clang-format introduces a line-break and a large indent for the next argument:


    // clang-format off
    some_function([&](auto aArg) {
        dosomething();
    }, vArg);


    // clang-format on
    some_function([&](auto aArg) {
        dosomething();
    },
                  vArg);

Tested with Ubuntu clang-format version
12.0.1-++20210905123922+fed41342a82f-1~exp1~20210904224655.134

-- 
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/20210909/2cbb6005/attachment.html>


More information about the llvm-bugs mailing list