Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang-format: [JS] fix uninitialized memory.
SortJavaScriptImports attempts to set its currently parsed token to an invalid token when it reaches the end of the line. However in doing so, it used a `FormatToken`, which contains a `Token Tok`. `Token` does not have a constructor, so its fields start out as uninitialized memory. `Token::startToken()` initializes all fields. Calling it in `JavaScriptImportSorter`'s constructor thus fixes the problem. Differential Revision: https://reviews.llvm.org/D118448
- Loading branch information