[llvm-bugs] [Bug 26772] New: braced initialization breaks lambda capture expressions formatting
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Feb 29 06:31:07 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26772
Bug ID: 26772
Summary: braced initialization breaks lambda capture
expressions formatting
Product: clang
Version: 3.7
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: galdava at koreamail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Classification: Unclassified
SSCCE:
int break_me() {
int x = 42;
return int{[x = x]() {
return x;
}()};
}
Gets formatted as:
int break_me() {
int x = 42;
return int{[x = x](){return x;
}
()
}
;
}
However, if you use the default initialization (i.e.: int(...)), it's formatted
properly:
int break_me() {
int x = 42;
return int([x = x]() { return x; }());
}
--
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/20160229/f9526744/attachment.html>
More information about the llvm-bugs
mailing list