Here's a little one-off patch that fixes
https://llvm.org/bugs/show_bug.cgi?id=19986 for me, by allowing a few
more things inside [] when trying to match a lambda capture section.
I hope someone can help it find its way into the main repo.
Differential D18793
fix for 19986, extra spacing around c++14 lambda capture with initializer arnetheduck on Apr 5 2016, 7:46 AM. Authored by
Details
Here's a little one-off patch that fixes I hope someone can help it find its way into the main repo.
Diff Detail Event TimelineComment Actions Please add tests in unittests/Format/FormatTest.cpp.
Comment Actions Thanks for the comments - I'll see when I have time to get back to this as the current patch happens to take care of my (rather limited) use case..
|
We need to be much more error resilient here as people will frequently call clang-format with mismatched parentheses and such. I am actually quite skeptical about having yet another instance of parentheses counting. Maybe just call parseParens() instead?