[Lldb-commits] [lldb] r346247 - [ObjectFile] Prefer reinterpret_cast<>
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 6 09:42:15 PST 2018
Author: davide
Date: Tue Nov 6 09:42:14 2018
New Revision: 346247
URL: http://llvm.org/viewvc/llvm-project?rev=346247&view=rev
Log:
[ObjectFile] Prefer reinterpret_cast<>
Modified:
lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
Modified: lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp?rev=346247&r1=346246&r2=346247&view=diff
==============================================================================
--- lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp (original)
+++ lldb/trunk/unittests/ObjectFile/ELF/TestObjectFileELF.cpp Tue Nov 6 09:42:14 2018
@@ -145,13 +145,13 @@ TEST_F(ObjectFileELFTest, GetModuleSpeci
static void CHECK_ABS32(uint8_t *bytes, uint32_t offset, uint32_t addend) {
uint32_t res;
- memcpy(&res, (uint32_t *)(bytes + offset), sizeof(uint32_t));
+ memcpy(&res, reinterpret_cast<uint32_t *>(bytes + offset), sizeof(uint32_t));
ASSERT_EQ(addend, res);
}
static void CHECK_ABS64(uint8_t *bytes, uint64_t offset, uint64_t addend) {
uint64_t res;
- memcpy(&res, (uint64_t *)(bytes + offset), sizeof(uint64_t));
+ memcpy(&res, reinterpret_cast<uint64_t *>(bytes + offset), sizeof(uint64_t));
ASSERT_EQ(addend, res);
}
More information about the lldb-commits
mailing list