[cfe-commits] r106043 - in /cfe/trunk: include/clang/Lex/Token.h lib/Frontend/PrintPreprocessedOutput.cpp

Chris Lattner sabre at nondot.org
Tue Jun 15 14:06:38 PDT 2010


Author: lattner
Date: Tue Jun 15 16:06:38 2010
New Revision: 106043

URL: http://llvm.org/viewvc/llvm-project?rev=106043&view=rev
Log:
fix the various buildbot failures by ensuring that tokens are really completely initialized.

Modified:
    cfe/trunk/include/clang/Lex/Token.h
    cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp

Modified: cfe/trunk/include/clang/Lex/Token.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Token.h?rev=106043&r1=106042&r2=106043&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/Token.h (original)
+++ cfe/trunk/include/clang/Lex/Token.h Tue Jun 15 16:06:38 2010
@@ -148,6 +148,7 @@
     Kind = tok::unknown;
     Flags = 0;
     PtrData = 0;
+    UintData = 0;
     Loc = SourceLocation();
   }
 

Modified: cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp?rev=106043&r1=106042&r2=106043&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp Tue Jun 15 16:06:38 2010
@@ -392,10 +392,9 @@
                                     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.





More information about the cfe-commits mailing list