]> granicus.if.org Git - clang/commitdiff
Silenced a couple of VC++ warnings.
authorHartmut Kaiser <hartmut.kaiser@gmail.com>
Thu, 18 Oct 2007 12:47:01 +0000 (12:47 +0000)
committerHartmut Kaiser <hartmut.kaiser@gmail.com>
Thu, 18 Oct 2007 12:47:01 +0000 (12:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43125 91177308-0d34-0410-b5e6-96231b3b80d8

Lex/Lexer.cpp

index 19dcfe2f0c6473815652783913bb0eddc433f82a..ffa352f37540d6e1d6c38ca68772021c2930c067 100644 (file)
@@ -233,26 +233,27 @@ static void InitCharacterInfo() {
 /// isIdentifierBody - Return true if this is the body character of an
 /// identifier, which is [a-zA-Z0-9_].
 static inline bool isIdentifierBody(unsigned char c) {
-  return CharInfo[c] & (CHAR_LETTER|CHAR_NUMBER|CHAR_UNDER);
+  return (CharInfo[c] & (CHAR_LETTER|CHAR_NUMBER|CHAR_UNDER)) ? true : false;
 }
 
 /// isHorizontalWhitespace - Return true if this character is horizontal
 /// whitespace: ' ', '\t', '\f', '\v'.  Note that this returns false for '\0'.
 static inline bool isHorizontalWhitespace(unsigned char c) {
-  return CharInfo[c] & CHAR_HORZ_WS;
+  return (CharInfo[c] & CHAR_HORZ_WS) ? true : false;
 }
 
 /// isWhitespace - Return true if this character is horizontal or vertical
 /// whitespace: ' ', '\t', '\f', '\v', '\n', '\r'.  Note that this returns false
 /// for '\0'.
 static inline bool isWhitespace(unsigned char c) {
-  return CharInfo[c] & (CHAR_HORZ_WS|CHAR_VERT_WS);
+  return (CharInfo[c] & (CHAR_HORZ_WS|CHAR_VERT_WS)) ? true : false;
 }
 
 /// isNumberBody - Return true if this is the body character of an
 /// preprocessing number, which is [a-zA-Z0-9_.].
 static inline bool isNumberBody(unsigned char c) {
-  return CharInfo[c] & (CHAR_LETTER|CHAR_NUMBER|CHAR_UNDER|CHAR_PERIOD);
+  return (CharInfo[c] & (CHAR_LETTER|CHAR_NUMBER|CHAR_UNDER|CHAR_PERIOD)) ? 
+    true : false;
 }