[clang] [compiler-rt] [libcxx] [llvm] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 06:11:02 PDT 2024
================
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, reinterpret_cast<void*>(std::__to_address(__base_)), sizeof(value_type));
----------------
serge-sans-paille wrote:
ack for the false positive. I'll move that to a static_cast which should silent the warning.
https://github.com/llvm/llvm-project/pull/111434
More information about the cfe-commits
mailing list