[cfe-commits] r132674 - /cfe/trunk/include/clang/Sema/Sema.h
Francois Pichet
pichet2000 at gmail.com
Sun Jun 5 19:42:06 PDT 2011
Author: fpichet
Date: Sun Jun 5 21:42:06 2011
New Revision: 132674
URL: http://llvm.org/viewvc/llvm-project?rev=132674&view=rev
Log:
Fix MSVC warning:
"unsafe mix of type 'int' and type 'bool' in operation"
Modified:
cfe/trunk/include/clang/Sema/Sema.h
Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=132674&r1=132673&r2=132674&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Sun Jun 5 21:42:06 2011
@@ -624,10 +624,14 @@
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
More information about the cfe-commits
mailing list