1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00

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 b58181793d
commit 095c140c09
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; }