[PATCH] D36142: clang-format: [JS] do not insert whitespace in call positions.
Martin Probst via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 14 06:56:02 PDT 2017
mprobst added inline comments.
================
Comment at: lib/Format/TokenAnnotator.cpp:2355
+ (Left.Tok.getIdentifierInfo() ||
+ Left.isOneOf(tok::kw_switch, tok::kw_case, tok::kw_delete)))
+ return false;
----------------
djasper wrote:
> Why is instanceof not required in this list?
`instanceof` is not a keyword in the C++ sense, so it is covered by the `getIdentifierInfo` part. But this was actually a misunderstanding - `getIdentifierInfo` actually covers all keyword-ish tokens, so we don't need the list of tokens here at all.
https://reviews.llvm.org/D36142
More information about the cfe-commits
mailing list