From 84843ed5364bf456d0e7fdd10f4e6e743c3f88bd Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Fri, 17 Oct 2014 01:52:30 +0000 Subject: [PATCH] A << operation would be undefined for a bit-selecting function because of a '1u' making it a 32-bit value when it really needed to be a 64-bit value. Trivial to fix once I figured out what was going on. clang static analzyer fixit. llvm-svn: 220022 --- lldb/source/Plugins/Process/Utility/InstructionUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Process/Utility/InstructionUtils.h b/lldb/source/Plugins/Process/Utility/InstructionUtils.h index 813990095c49..6226fbc04b08 100644 --- a/lldb/source/Plugins/Process/Utility/InstructionUtils.h +++ b/lldb/source/Plugins/Process/Utility/InstructionUtils.h @@ -20,7 +20,7 @@ static inline uint64_t Bits64 (const uint64_t bits, const uint32_t msbit, const uint32_t lsbit) { assert(msbit < 64 && lsbit <= msbit); - return (bits >> lsbit) & ((1u << (msbit - lsbit + 1)) - 1); + return (bits >> lsbit) & ((1ull << (msbit - lsbit + 1)) - 1); } // Return the bit field(s) from the most significant bit (msbit) to the