Avoid warnings about conversions to `bool' in MS compilers.

Patch by Nathan Jeffords!

llvm-svn: 114662
This commit is contained in:
Oscar Fuentes 2010-09-23 16:59:44 +00:00
parent 57214f533a
commit d5f4130ffb
2 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ public:
/// paramHasAttr - Return true if the specified parameter index has the
/// specified attribute set.
bool paramHasAttr(unsigned Idx, Attributes Attr) const {
return getAttributes(Idx) & Attr;
return static_cast<bool>(getAttributes(Idx) & Attr);
}
/// getParamAlignment - Return the alignment for the specified function

View File

@ -99,7 +99,7 @@ public:
/// hasNoSignedWrap - Test whether this operation is known to never
/// undergo signed overflow, aka the nsw property.
bool hasNoSignedWrap() const {
return SubclassOptionalData & NoSignedWrap;
return static_cast<bool>(SubclassOptionalData & NoSignedWrap);
}
static inline bool classof(const OverflowingBinaryOperator *) { return true; }