Skip to content

Commit 01213f9

Browse files
committed
[clang-tidy] Initialize token before handing it to the lexer
Found by msan.
1 parent 79748ad commit 01213f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ classifyToken(const FunctionDecl &F, Preprocessor &PP, Token Tok) {
173173
bool ContainsSomethingElse = false;
174174

175175
Token End;
176+
End.startToken();
176177
End.setKind(tok::eof);
177178
SmallVector<Token, 2> Stream{Tok, End};
178179

0 commit comments

Comments
 (0)