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: unassignedclangb...@nondot.org Reporter: btol...@gmail.com CC: djas...@google.com, kli...@google.com, llvm-bugs@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs