djasper added inline comments.
================
Comment at: lib/Format/TokenAnnotator.cpp:2127
@@ +2126,3 @@
+ // Postfix non-null assertion operator, as in `foo!.bar()`.
+ if (Right.is(tok::exclaim) && Right.Next &&
+ Right.Next->isNot(tok::identifier) && !Right.Next->Tok.isLiteral())
----------------
From a quick look at our codebase, I think you need to also rule out the
following for Right.Next:
- (, [, {
- ! ('!!' seems to be a thing)
- -, +, ~ (don't know exactly what this does to a JS boolean value)
- %, $ (not entirely sure whether these become part of the identifier)
http://reviews.llvm.org/D21204
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits