[llvm] r275971 - Get rid of VS2015 operator precedence warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 05:26:54 PDT 2016


Author: rksimon
Date: Tue Jul 19 07:26:51 2016
New Revision: 275971

URL: http://llvm.org/viewvc/llvm-project?rev=275971&view=rev
Log:
Get rid of VS2015 operator precedence warning. NFCI.

Modified:
    llvm/trunk/include/llvm/Support/MathExtras.h

Modified: llvm/trunk/include/llvm/Support/MathExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MathExtras.h?rev=275971&r1=275970&r2=275971&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MathExtras.h (original)
+++ llvm/trunk/include/llvm/Support/MathExtras.h Tue Jul 19 07:26:51 2016
@@ -300,7 +300,7 @@ inline bool isShiftedInt(int64_t x) {
 template <unsigned N>
 inline typename std::enable_if<(N < 64), bool>::type isUInt(uint64_t X) {
   static_assert(N > 0, "isUInt<0> doesn't make sense");
-  return X < (UINT64_C(1) << N);
+  return X < (UINT64_C(1) << (N));
 }
 template <unsigned N>
 inline typename std::enable_if<N >= 64, bool>::type isUInt(uint64_t X) {




More information about the llvm-commits mailing list