diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-01-25 22:12:45 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-01-25 22:12:45 +0000 |
commit | 66f1f30725eb20760069823ec015234cce6b887c (patch) | |
tree | 0588a528048511d4b2a49f9627d5f62a3eaeb2a0 /include/llvm/Support/MathExtras.h | |
parent | ce98f09f539b09c2565bc6f7608e430fd190a1cc (diff) |
Add parens to suppress an MSVC 2012 << precedence warning
It doesn't seem to like instantiating the isUInt<unsigned N> template
with 6+3, and then doing <<N.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MathExtras.h')
-rw-r--r-- | include/llvm/Support/MathExtras.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h index 190df1f05e..214bb6ca26 100644 --- a/include/llvm/Support/MathExtras.h +++ b/include/llvm/Support/MathExtras.h @@ -65,7 +65,7 @@ inline bool isShiftedInt(int64_t x) { /// isUInt - Checks if an unsigned integer fits into the given bit width. template<unsigned N> inline bool isUInt(uint64_t x) { - return N >= 64 || x < (UINT64_C(1)<<N); + return N >= 64 || x < (UINT64_C(1)<<(N)); } // Template specializations to get better code for common cases. template<> |