[PATCH] D11693: clang-format: Support generalized lambda captures.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 17 09:46:23 PDT 2015


djasper added inline comments.

================
Comment at: lib/Format/UnwrappedLineParser.cpp:1060-1061
@@ +1059,4 @@
+      nextToken();
+      while (!eof()) {
+        // FIXME: Once we have an expression parser in the UnwrappedLineParser,
+        // replace this by using parseAssigmentExpression() inside. See also
----------------
Again, please remove the FIXME. We aren't going to have an expression parser here (anytime soon) and shouldn't add (more) comments that make people think otherwise.

================
Comment at: lib/Format/UnwrappedLineParser.cpp:1064
@@ +1063,3 @@
+        // parseBracedList. For now, parsing matching braces ([], (), {}) is
+        // good enough.
+        if (FormatTok->is(tok::l_paren)) {
----------------
Ah, parseAngle doesn't exist here. I was thinking about the TokenAnnotator.

I don't understand your comment about mid-stream. This is precisely about the case where the input is corrupt so that clang-format can recover and doesn't just parse the reset of the file input the lambda introducer.


http://reviews.llvm.org/D11693





More information about the cfe-commits mailing list