projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab083f7
)
Add parens to suppress an MSVC 2012 << precedence warning
author
Reid Kleckner
<reid@kleckner.net>
Fri, 25 Jan 2013 22:12:45 +0000
(22:12 +0000)
committer
Reid Kleckner
<reid@kleckner.net>
Fri, 25 Jan 2013 22:12:45 +0000
(22:12 +0000)
It doesn't seem to like instantiating the isUInt<unsigned N> template
with 6+3, and then doing <<N.
llvm-svn: 173507
llvm/include/llvm/Support/MathExtras.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/Support/MathExtras.h
b/llvm/include/llvm/Support/MathExtras.h
index
190df1f
..
214bb6c
100644
(file)
--- 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<>