[PATCH] D30399: clang-format: [JS] whitespace after async in arrow functions.
Daniel Jasper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 03:13:01 PST 2017
djasper added inline comments.
================
Comment at: lib/Format/TokenAnnotator.cpp:2229
+ if (Left.is(Keywords.kw_async) && Right.is(tok::l_paren) &&
+ Right.MatchingParen && Right.MatchingParen->getNextNonComment() &&
+ Right.MatchingParen->getNextNonComment()->is(TT_JsFatArrow))
----------------
As getNextNonComment() walks linearly over the tokens, I'd pull it out into a variable.
https://reviews.llvm.org/D30399
More information about the cfe-commits
mailing list