projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25a0814
)
protect against negative values that would exceed allowed bit width
author
Torok Edwin
<edwintorok@gmail.com>
Sat, 29 Nov 2008 08:52:45 +0000
(08:52 +0000)
committer
Torok Edwin
<edwintorok@gmail.com>
Sat, 29 Nov 2008 08:52:45 +0000
(08:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60239
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/PointerIntPair.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/PointerIntPair.h
b/include/llvm/ADT/PointerIntPair.h
index 4c4bb7dd081f89b65be532f080018ec218abbb96..5a9425457ddde1ec6c4e9a297192e4c29e8342aa 100644
(file)
--- a/
include/llvm/ADT/PointerIntPair.h
+++ b/
include/llvm/ADT/PointerIntPair.h
@@
-53,7
+53,7
@@
public:
}
void setInt(IntType Int) {
- assert(
Int
< (1 << IntBits) && "Integer too large for field");
+ assert(
unsigned(Int)
< (1 << IntBits) && "Integer too large for field");
Value = reinterpret_cast<intptr_t>(getPointer()) | (intptr_t)Int;
}