djasper added inline comments.
================ Comment at: lib/Format/TokenAnnotator.cpp:2292 return false; - // Postfix non-null assertion operator, as in `foo!.bar()`. - if (Right.is(tok::exclaim) && (Left.isOneOf(tok::identifier, tok::r_paren, - tok::r_square, tok::r_brace) || - Left.Tok.isLiteral())) + if (isJSNonNullOperator(Right)) return false; ---------------- Hm. Generally, we try to set the TokenType instead of computing this information multiple times. It's not overly important here, but I can easily foresee that we are going to need to know what kind of "!" this is in ContinuationIndenter.cpp at some point. So I'd suggest to move this code into the huge mess that is determineTokenType (and define corresponding token type in FormatToken.h). https://reviews.llvm.org/D30705 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits