[llvm-bugs] [Bug 41349] New: Lambda code misformatted due to a cast

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 2 08:49:40 PDT 2019


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

            Bug ID: 41349
           Summary: Lambda code misformatted due to a cast
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: oleg at smolsky.net
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

This is formatted correctly:

    Call({a, [=]() { something1(o); }, b});

This is misformatted:

    void F() {
      Call({(Cast)[] { f(); }});
    }

It looks like the '[' is parsed as an array access, rather than a lambda
introducer.

-- 
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/20190402/8f3ab251/attachment.html>


More information about the llvm-bugs mailing list