[PATCH] D11693: clang-format: Support generalized lambda captures.
strager via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 18:12:21 PDT 2015
strager planned changes to this revision.
================
Comment at: lib/Format/UnwrappedLineParser.cpp:1057-1058
@@ +1056,4 @@
+ while (!eof()) {
+ // FIXME: Once we have an expression parser in the UnwrappedLineParser,
+ // replace this by using parseAssigmentExpression() inside.
+ if (FormatTok->is(tok::l_paren)) {
----------------
djasper wrote:
> I very much doubt that we'll have an Expression parser here anytime soon. So, I don't think that this FIXME makes much sense. Instead, please provide a comment on what this is actually doing and in which cases it might fail.
I copied the comment from elsewhere in the file.
================
Comment at: lib/Format/UnwrappedLineParser.cpp:1061
@@ +1060,3 @@
+ parseParens();
+ } else if (FormatTok->isOneOf(tok::comma, tok::r_square)) {
+ break;
----------------
djasper wrote:
> I think this list should be extended to figure out certain cases where we know something is fishy. In particular:
> * If you find an l_square or less, call into parseSquare and parseAngle respectively.
> * If you find an r_brace or semi, something is wrong, break.
>
Will do.
http://reviews.llvm.org/D11693
More information about the cfe-commits
mailing list