[clang-tools-extra] 01213f9 - [clang-tidy] Initialize token before handing it to the lexer
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 29 07:49:09 PST 2020
Author: Benjamin Kramer
Date: 2020-01-29T16:48:57+01:00
New Revision: 01213f90700dbb98a0dbcc01da8fdb89f6db5617
URL: https://github.com/llvm/llvm-project/commit/01213f90700dbb98a0dbcc01da8fdb89f6db5617
DIFF: https://github.com/llvm/llvm-project/commit/01213f90700dbb98a0dbcc01da8fdb89f6db5617.diff
LOG: [clang-tidy] Initialize token before handing it to the lexer
Found by msan.
Added:
Modified:
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
index 71cb0300ec62..41b7e1739ee0 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
@@ -173,6 +173,7 @@ classifyToken(const FunctionDecl &F, Preprocessor &PP, Token Tok) {
bool ContainsSomethingElse = false;
Token End;
+ End.startToken();
End.setKind(tok::eof);
SmallVector<Token, 2> Stream{Tok, End};
More information about the cfe-commits
mailing list