[cfe-commits] r43125 - /cfe/trunk/Lex/Lexer.cpp
Hartmut Kaiser
hartmut.kaiser at gmail.com
Thu Oct 18 05:47:02 PDT 2007
Author: hkaiser
Date: Thu Oct 18 07:47:01 2007
New Revision: 43125
URL: http://llvm.org/viewvc/llvm-project?rev=43125&view=rev
Log:
Silenced a couple of VC++ warnings.
Modified:
cfe/trunk/Lex/Lexer.cpp
Modified: cfe/trunk/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/Lexer.cpp?rev=43125&r1=43124&r2=43125&view=diff
==============================================================================
--- cfe/trunk/Lex/Lexer.cpp (original)
+++ cfe/trunk/Lex/Lexer.cpp Thu Oct 18 07:47:01 2007
@@ -233,26 +233,27 @@
/// 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;
}
More information about the cfe-commits
mailing list