Fix MSVC warning:

"unsafe mix of type 'int' and type 'bool' in operation"

llvm-svn: 132674
This commit is contained in:
Francois Pichet 2011-06-06 02:42:06 +00:00
parent d50f169098
commit a5276ec598
1 changed files with 6 additions and 2 deletions

View File

@ -624,10 +624,14 @@ public:
void setMethod(CXXMethodDecl *MD) { Pair.setPointer(MD); }
bool hasSuccess() const { return Pair.getInt() & 0x1; }
void setSuccess(bool B) { Pair.setInt(B | hasConstParamMatch() << 1); }
void setSuccess(bool B) {
Pair.setInt(unsigned(B) | hasConstParamMatch() << 1);
}
bool hasConstParamMatch() const { return Pair.getInt() & 0x2; }
void setConstParamMatch(bool B) { Pair.setInt(B << 1 | hasSuccess()); }
void setConstParamMatch(bool B) {
Pair.setInt(unsigned(B) << 1 | hasSuccess());
}
};
/// \brief A cache of special member function overload resolution results