Currently Lexer::FindNextToken does not have any unittests associated with it.
- This patch adds a test for this method.
- This test acts as a documentation for how to use this.
- This method is used at various places in clang-tidy, clang and clangd using a similar pattern as in the tests. Thus this will prevent those usages to break in the future.
NIT: could be replaced with
To avoid creating an extra variable.
But up to you, this version also looks ok.