[clang] f213207 - Lexer::ReadToEndOfLine - fix Token uninitialised value warnings. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 11:29:24 PDT 2019
Author: Simon Pilgrim
Date: 2019-10-28T18:28:18Z
New Revision: f2132070d9a5a330400744aa14819344d0b44151
URL: https://github.com/llvm/llvm-project/commit/f2132070d9a5a330400744aa14819344d0b44151
DIFF: https://github.com/llvm/llvm-project/commit/f2132070d9a5a330400744aa14819344d0b44151.diff
LOG: Lexer::ReadToEndOfLine - fix Token uninitialised value warnings. NFCI.
Use Token::startToken to initialize Token.
Added:
Modified:
clang/lib/Lex/Lexer.cpp
Removed:
################################################################################
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 17f5ab1e035d..902b17397915 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -2656,6 +2656,7 @@ void Lexer::ReadToEndOfLine(SmallVectorImpl<char> *Result) {
assert(ParsingPreprocessorDirective && ParsingFilename == false &&
"Must be in a preprocessing directive!");
Token Tmp;
+ Tmp.startToken();
// CurPtr - Cache BufferPtr in an automatic variable.
const char *CurPtr = BufferPtr;
More information about the cfe-commits
mailing list