Index: include/clang/Basic/IdentifierTable.h
===================================================================
--- include/clang/Basic/IdentifierTable.h	(revision 47480)
+++ include/clang/Basic/IdentifierTable.h	(working copy)
@@ -36,7 +36,8 @@
 /// variable or function name).  The preprocessor keeps this information in a
 /// set, and all tok::identifier tokens have a pointer to one of these.  
 class IdentifierInfo {
-  tok::TokenKind TokenID      : 8; // Front-end token ID or tok::identifier.
+  // DON'T make TokenID a 'tok::TokenKind'; MSVC will treat it as a signed char and TokenKinds > 127 won't be handled correctly.
+  unsigned TokenID            : 8; // Front-end token ID or tok::identifier. 
   unsigned BuiltinID          : 9; // ID if this is a builtin (__builtin_inf).
   tok::ObjCKeywordKind ObjCID : 5; // ID for objc @ keyword like @'protocol'.
   bool HasMacro               : 1; // True if there is a #define for this.
@@ -79,7 +80,7 @@
   /// get/setTokenID - If this is a source-language token (e.g. 'for'), this API
   /// can be used to cause the lexer to map identifiers to source-language
   /// tokens.
-  tok::TokenKind getTokenID() const { return TokenID; }
+  tok::TokenKind getTokenID() const { return (tok::TokenKind)TokenID; }
   void setTokenID(tok::TokenKind ID) { TokenID = ID; }
   
   /// getPPKeywordID - Return the preprocessor keyword ID for this identifier.
Index: include/clang/Lex/Token.h
===================================================================
--- include/clang/Lex/Token.h	(revision 47480)
+++ include/clang/Lex/Token.h	(working copy)
@@ -36,7 +36,7 @@
 
   /// Kind - The actual flavor of token this is.
   ///
-  tok::TokenKind Kind : 8;
+  unsigned Kind : 8;  // DON'T make Kind a 'tok::TokenKind'; MSVC will treat it as a signed char and TokenKinds > 127 won't be handled correctly.
   
   /// Flags - Bits we track about this token, members of the TokenFlags enum.
   unsigned Flags : 8;
@@ -50,7 +50,7 @@
     NeedsCleaning = 0x08   // Contained an escaped newline or trigraph.
   };
 
-  tok::TokenKind getKind() const { return Kind; }
+  tok::TokenKind getKind() const { return (tok::TokenKind)Kind; }
   void setKind(tok::TokenKind K) { Kind = K; }
   
   /// is/isNot - Predicates to check if this token is a specific kind, as in
@@ -66,7 +66,7 @@
   void setLocation(SourceLocation L) { Loc = L; }
   void setLength(unsigned Len) { Length = Len; }
   
-  const char *getName() const { return tok::getTokenName(Kind); }
+  const char *getName() const { return tok::getTokenName((tok::TokenKind)Kind); }
   
   /// startToken - Reset all flags to cleared.
   ///
