From ea7765860d105805b1db3fac4ca1d876c2516506 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 18 Nov 2007 05:48:46 +0000 Subject: [PATCH] minor cleanups llvm-svn: 44212 --- utils/TableGen/TGLexer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/TGLexer.cpp b/utils/TableGen/TGLexer.cpp index e49af042339..bd12f2c38eb 100644 --- a/utils/TableGen/TGLexer.cpp +++ b/utils/TableGen/TGLexer.cpp @@ -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';