is used in projects that have stricter warning control than LLVM. This also
helps us find casts more easily if we ever need to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28263
91177308-0d34-0410-b5e6-
96231b3b80d8
template<class T>
static unsigned Bit(const T &V) {
- unsigned BitPos = (unsigned)V;
+ unsigned BitPos = reinterpret_cast<unsigned>(V);
assert(BitPos < sizeof(unsigned) * 8 &&
"enum exceeds width of bit vector!");
return 1 << BitPos;
template<class T>
static unsigned Bit(const T &V) {
- unsigned BitPos = (unsigned)V;
+ unsigned BitPos = reinterpret_cast<unsigned>(V);
assert(BitPos < sizeof(unsigned) * 8 &&
"enum exceeds width of bit vector!");
return 1 << BitPos;