From bba37f4dea351fe4a921a728e361892423696f54 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 15 Jun 2010 21:06:38 +0000 Subject: [PATCH] fix the various buildbot failures by ensuring that tokens are really completely initialized. llvm-svn: 106043 --- clang/include/clang/Lex/Token.h | 1 + clang/lib/Frontend/PrintPreprocessedOutput.cpp | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Lex/Token.h b/clang/include/clang/Lex/Token.h index 4a7636b7d269..ef5326909b25 100644 --- a/clang/include/clang/Lex/Token.h +++ b/clang/include/clang/Lex/Token.h @@ -148,6 +148,7 @@ public: Kind = tok::unknown; Flags = 0; PtrData = 0; + UintData = 0; Loc = SourceLocation(); } diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index b5bbd52dbd73..74552dda25fb 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -392,10 +392,9 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, PrintPPOutputPPCallbacks *Callbacks, llvm::raw_ostream &OS) { char Buffer[256]; - Token PrevPrevTok; - Token PrevTok; - PrevPrevTok.setKind(tok::unknown); - PrevTok.setKind(tok::unknown); + Token PrevPrevTok, PrevTok; + PrevPrevTok.startToken(); + PrevTok.startToken(); while (1) { // If this token is at the start of a line, emit newlines if needed.