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 | 1bda56ce55f4a298cbc8e7ef0ce435945d2bb18f (patch) | |
tree | c2147021b25de2f15dedeb7b5c2b1459af0d0ee3 | |
parent | ab083f727bbe569d80bc98fee8933d9a7c6b42ad (diff) | |
download | bcm5719-llvm-1bda56ce55f4a298cbc8e7ef0ce435945d2bb18f.tar.gz bcm5719-llvm-1bda56ce55f4a298cbc8e7ef0ce435945d2bb18f.zip |
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.
llvm-svn: 173507
-rw-r--r-- | llvm/include/llvm/Support/MathExtras.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h index 190df1f05eb..214bb6ca26e 100644 --- a/llvm/include/llvm/Support/MathExtras.h +++ b/llvm/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<> |