[PATCH] D52676: [clang-format] tweaked another case of lambda formatting
Jeff Trull via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 3 10:12:42 PDT 2020
jaafar added a comment.
Hi everyone, I've been investigating a bug and bisected it to this commit.
The problem, in brief, is that lambdas passed as arguments can cause an extra line break before the first argument, but only if the lambda is neither the first nor the last argument. This implies, of course, that there are at least three arguments supplied... Perhaps the most minimal example is:
void f()
{
func(0, [] {}, 0);
}
which gets formatted as:
void
f ()
{
func (
0, [] {}, 0);
}
(note the unnecessary newline after the left paren)
I found three existing reports of this problem: 28546 <https://bugs.llvm.org/show_bug.cgi?id=28546>, 45141 <https://bugs.llvm.org/show_bug.cgi?id=45141>, and 45424 <https://bugs.llvm.org/show_bug.cgi?id=45424>. I'm posting here in lieu of creating a fourth duplicate bug report, in the hopes that it will be more likely to find someone who can fix it. Thank you.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D52676/new/
https://reviews.llvm.org/D52676
More information about the cfe-commits
mailing list