[Format] Fix crash when hitting eof while lexing JS template string
Different loop termination conditions resulted in confusion of whether *Offset was intended to be inside or outside the token. This ultimately led to constructing an out-of-range SourceLocation. Fix by making Offset consistently point *after* the token. Differential Revision: https://reviews.llvm.org/D135356
Loading
Please sign in to comment