[llvm-bugs] [Bug 24672] New: Lack of option to keep short lambda on a single line

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 2 01:45:12 PDT 2015


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: unassignedclangbugs at nondot.org
          Reporter: predelnik at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150902/f33a6271/attachment.html>


More information about the llvm-bugs mailing list