From 32d2c5de6419a4f8dec260d9ab557004534e0970 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Thu, 23 Sep 2010 16:59:44 +0000 Subject: [PATCH] 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 --- include/llvm/Attributes.h | 2 +- include/llvm/Operator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 1296d67d525..580ae7339e1 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(getAttributes(Idx) & Attr); } /// getParamAlignment - Return the alignment for the specified function diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index 60865aa8ad4..d8484176253 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(SubclassOptionalData & NoSignedWrap); } static inline bool classof(const OverflowingBinaryOperator *) { return true; }