diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-06-06 02:42:06 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-06-06 02:42:06 +0000 |
commit | c9f487a8aa73376b8cbee364663b50956fc641a2 (patch) | |
tree | 1b9b6be97eeb76fac7de41a9facd60e3e61c3644 | |
parent | 74d487e085c1555fb694c7ddf58315ae5e1bbecd (diff) |
Fix MSVC warning:
"unsafe mix of type 'int' and type 'bool' in operation"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132674 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Sema/Sema.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 4156d6704e..87379d73eb 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -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 |