[clang-format] Fix uninitialized memory problem
authorsstwcw <f0gukp2nk@protonmail.com>
Sun, 26 Jun 2022 22:22:27 +0000 (22:22 +0000)
committersstwcw <f0gukp2nk@protonmail.com>
Sun, 26 Jun 2022 22:23:50 +0000 (22:23 +0000)
commit141ad3ba05711cc8396a34fce6b26648d216eb8e
tree4191c1bc493fc6f78f43950a652fec17f897daff
parent016342e319fd31e41cf5ed16a6140a8ea2de74dd
[clang-format] Fix uninitialized memory problem

The setLength function checks for the token kind which could be
uninitialized in the previous version.

The problem was introduced in 2e32ff106e.

Reviewed By: MyDeveloperDay, owenpan

Differential Revision: https://reviews.llvm.org/D128607
clang/lib/Format/FormatTokenLexer.cpp