[llvm-bugs] [Bug 50931] New: clang-format: ColumnLimit:0 breaks lambda formatting
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 29 06:09:22 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50931
Bug ID: 50931
Summary: clang-format: ColumnLimit:0 breaks lambda formatting
Product: clang
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: kalinnikov at seaproject.ru
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Setting ColumnLimit to 0 causes clang-format to add an extra line break between
[] and { for a single-line lambda.
---
test.cpp:
int main() {
std::vector<int> v;
std::find_if(v.begin(), v.end(), [] {return 1;});
}
---
.clang-format:
BreakBeforeBraces: Custom
BraceWrapping:
BeforeLambdaBody: true
ColumnLimit: 0
clang-format test.cpp:
int main() {
std::vector<int> v;
std::find_if(v.begin(), v.end(), []
{ return 1; });
}
---
.clang-format:
BreakBeforeBraces: Custom
BraceWrapping:
BeforeLambdaBody: true
clang-format test.cpp:
int main() {
std::vector<int> v;
std::find_if(v.begin(), v.end(), [] { return 1; });
}
--
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/20210629/648aa680/attachment-0001.html>
More information about the llvm-bugs
mailing list