/// 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;
}
for (; ThisTokBuf != ThisTokEnd; ++ThisTokBuf) {
int CharVal = HexDigitValue(ThisTokBuf[0]);
if (CharVal == -1) break;
- Overflow |= ResultChar & 0xF0000000; // About to shift out a digit?
+ Overflow |= (ResultChar & 0xF0000000) ? true : false; // About to shift out a digit?
ResultChar <<= 4;
ResultChar |= CharVal;
}
}
bool isConstQualified() const {
- return ThePtr & Const;
+ return (ThePtr & Const) ? true : false;
}
bool isVolatileQualified() const {
- return ThePtr & Volatile;
+ return (ThePtr & Volatile) ? true : false;
}
bool isRestrictQualified() const {
- return ThePtr & Restrict;
+ return (ThePtr & Restrict) ? true : false;
}
/// addConst/addVolatile/addRestrict - add the specified type qual to this
#define LLVM_CLANG_BASIC_TARGETINFO_H
#include "clang/Basic/SourceLocation.h"
+#include "llvm/Support/DataTypes.h"
#include <vector>
#include <string>
namespace clang {
class MacroInfo;
- class LangOptions;
+ struct LangOptions;
/// IdentifierInfo - One of these records is kept for each identifier that
/// is lexed. This contains information about whether the token was #define'd,
/// isAtStartOfLine - Return true if this token is at the start of a line.
///
- bool isAtStartOfLine() const { return Flags & StartOfLine; }
+ bool isAtStartOfLine() const { return (Flags & StartOfLine) ? true : false; }
/// hasLeadingSpace - Return true if this token has whitespace before it.
///
- bool hasLeadingSpace() const { return Flags & LeadingSpace; }
+ bool hasLeadingSpace() const { return (Flags & LeadingSpace) ? true : false; }
/// isExpandDisabled - Return true if this identifier token should never
/// be expanded in the future, due to C99 6.10.3.4p2.
- bool isExpandDisabled() const { return Flags & DisableExpand; }
+ bool isExpandDisabled() const { return (Flags & DisableExpand) ? true : false; }
/// isObjCAtKeyword - Return true if we have an ObjC keyword identifier.
bool isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const;
/// needsCleaning - Return true if this token has trigraphs or escaped
/// newlines in it.
///
- bool needsCleaning() const { return Flags & NeedsCleaning; }
+ bool needsCleaning() const { return (Flags & NeedsCleaning) ? true : false; }
};
/// PPConditionalInfo - Information about the conditional stack (#if directives)
#include "llvm/ADT/SmallVector.h"
namespace clang {
- class LangOptions;
+ struct LangOptions;
class IdentifierInfo;
/// DeclSpec - This class captures information about "declaration specifiers",
-/// which encompases storage-class-specifiers, type-specifiers, type-qualifiers,
+/// which encompasses storage-class-specifiers, type-specifiers, type-qualifiers,
/// and function-specifiers.
class DeclSpec {
public: