[llvm-bugs] [Bug 38909] New: [clang-format] Support generators in C++
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 12 02:38:50 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38909
Bug ID: 38909
Summary: [clang-format] Support generators in C++
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: dennis.felsing at sap.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
We use lambdas to write code like:
int main()
{
int newValue;
If(match, [&]() {
newValue = false;
}).ElseIf(match2, [&]() {
newValue = true;
}).Else([&]() {
newValue = false;
});
}
Unfortunately clang-format since version 5 started indenting the ElseIf:
$ clang-format -style webkit x.cpp
int main()
{
int newValue;
If(match, [&]() {
newValue = false;
})
.ElseIf(match2, [&]() {
newValue = true;
})
.Else([&]() {
newValue = false;
});
}
I couldn't find an option to turn this behaviour off.
--
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/20180912/dbe58c2c/attachment.html>
More information about the llvm-bugs
mailing list