Shifting into the sign bit is technically undefined behavior. No known
compiler exploits it though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342909
91177308-0d34-0410-b5e6-
96231b3b80d8
}
static SLocEntry get(unsigned Offset, const FileInfo &FI) {
- assert(!(Offset & (1 << 31)) && "Offset is too large");
+ assert(!(Offset & (1u << 31)) && "Offset is too large");
SLocEntry E;
E.Offset = Offset;
E.IsExpansion = false;
}
static SLocEntry get(unsigned Offset, const ExpansionInfo &Expansion) {
- assert(!(Offset & (1 << 31)) && "Offset is too large");
+ assert(!(Offset & (1u << 31)) && "Offset is too large");
SLocEntry E;
E.Offset = Offset;
E.IsExpansion = true;
BLOCK_IS_GLOBAL = (1 << 28),
BLOCK_USE_STRET = (1 << 29),
BLOCK_HAS_SIGNATURE = (1 << 30),
- BLOCK_HAS_EXTENDED_LAYOUT = (1 << 31)
+ BLOCK_HAS_EXTENDED_LAYOUT = (1u << 31)
};
class BlockFlags {
uint32_t flags;