[llvm-bugs] [Bug 31750] New: clang-format does not handle lambda init capture by reference
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 24 22:22:39 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31750
Bug ID: 31750
Summary: clang-format does not handle lambda init capture by
reference
Product: clang
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: btolsch at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17890
--> https://llvm.org/bugs/attachment.cgi?id=17890&action=edit
Example of `clang-format -style=google` failing for lambda init capture
by-reference
When a lambda capture list includes an init capture by reference, clang-format
will not change any of the lambda code.
I attached an example C++ file which includes a lambda with a capture list that
exceeds the line limit in the body and the capture list. When running
`clang-format -style=google example.cpp`, neither line is wrapped to the 80
character limit. If capture list only uses by-value init capture (i.e. remove
the '&'s), the file will be formatted correctly.
--
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/20170125/30cef2ea/attachment.html>
More information about the llvm-bugs
mailing list