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

            Bug ID: 35461
           Summary: clang-format: wrong formatting of lambdas with
                    noexcept and trailing return type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: curde...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

The third lambda in the following snippet gets weirdly formatted:

    []() noexcept {};
    []() -> void {};
    []() noexcept->void{}; // <- incorrect

whereas corresponding functions are formatted in this way:

    auto f() noexcept;
    auto f() -> void;
    auto f() noexcept -> void; // <- OK

It may be related to bugs #28590 and #34777.

clang-format trunk from 2017-11-22.

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

Reply via email to