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

            Bug ID: 24672
           Summary: Lack of option to keep short lambda on a single line
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified

Currently it seems that `AllowShortFunctionsOnASingleLine` doesn't affect are
lambdas kept as a single line or not. I don't know if it should be part of this
option or made as a different one, but in my opinion keeping short lambdas on a
single line often seems much more clear at least in some coding styles.

For example,

std::find_if (a.cbegin (), a.cend (), [&](auto &x){ return x.is_good ();});

seems better than

std::find_if (a.cbegin (), a.cend (), [&](auto &x)
    {
      return x.is_good ();
    });

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

Reply via email to