minor cleanups
authorChris Lattner <sabre@nondot.org>
Sun, 18 Nov 2007 05:48:46 +0000 (05:48 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 18 Nov 2007 05:48:46 +0000 (05:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44212 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/TGLexer.cpp

index e49af0423393826f5f2c4c51bf603571c34c9770..bd12f2c38eb293eed61117b2261c75a39ffd2240 100644 (file)
@@ -56,7 +56,7 @@ int TGLexer::getNextChar() {
   char CurChar = *CurPtr++;
   switch (CurChar) {
   default:
-    return CurChar;
+    return (unsigned char)CurChar;
   case 0:
     // A nul character in the stream is either the end of the current buffer or
     // a random nul in the file.  Disambiguate that here.
@@ -84,7 +84,7 @@ int TGLexer::getNextChar() {
     // Only treat a \n\r or \r\n as a single line.
     if ((*CurPtr == '\n' || (*CurPtr == '\r')) &&
         *CurPtr != CurChar)
-      ++CurPtr;  // Each the two char newline sequence.
+      ++CurPtr;  // Eat the two char newline sequence.
       
     ++CurLineNo;
     return '\n';