[PATCH] D19204: clang-format: [JS] generator and async functions.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 19 11:27:05 PDT 2016

djasper added inline comments.

Comment at: unittests/Format/FormatTestJS.cpp:339
@@ +338,3 @@
+TEST_F(FormatTestJS, AsyncFunctions) {
+  verifyFormat("async function f() {\n"
+               "  let x = 1;\n"
Fundamentally, I think there is two things we might need to do:
1. Not allow wrapping it. I am ok with keeping that based on the operator wrapping for now, but it seems a bit dodgy.
2. The ExpressionParser in TokenAnnotator.cpp must not treat this as a binary operator or else it might do weird things with indentation. What't the token type at the moment?


More information about the cfe-commits mailing list