aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-09-23 16:59:44 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-09-23 16:59:44 +0000
commit32d2c5de6419a4f8dec260d9ab557004534e0970 (patch)
tree0c80a4546bef8da70317ec57c4580bc2cfe66e44
parentdf30bdb3a735a81b4182d80b870bc39846824396 (diff)
Avoid warnings about conversions to `bool' in MS compilers.
Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114662 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Attributes.h2
-rw-r--r--include/llvm/Operator.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h
index 1296d67d52..580ae7339e 100644
--- a/include/llvm/Attributes.h
+++ b/include/llvm/Attributes.h
@@ -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
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h
index 60865aa8ad..d848417625 100644
--- a/include/llvm/Operator.h
+++ b/include/llvm/Operator.h
@@ -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; }