forked from OSchip/llvm-project
Avoid warnings about conversions to `bool' in MS compilers.
Patch by Nathan Jeffords! llvm-svn: 114662
This commit is contained in:
parent
57214f533a
commit
d5f4130ffb
|
@ -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
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue