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

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 7 05:47:24 PDT 2015


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

Heinrich Janzing <heinrich.janzing at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |heinrich.janzing at gmail.com
         Resolution|WORKSFORME                  |---

--- Comment #9 from Heinrich Janzing <heinrich.janzing at gmail.com> ---
I was a bit surprise to read that this "works fine" for other people, because
clang-format always formatted lambdas using at least three lines for me:

[]
{
}

After some trial and error it turned out this is caused by using
"BreakBeforeBraces: Allman". That makes sense, in a way, but for obvious
reasons it would be preferred to nonetheless allow short or at the very least
empty lambdas on a single line. We have that possibility for functions and it
only seems *more* useful for lambdas.

-- 
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/20151007/e32431d1/attachment-0001.html>


More information about the llvm-bugs mailing list