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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs