[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 00:55:57 PDT 2024


================
@@ -638,7 +638,7 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _
     __guard.__complete();
     std::__allocator_destroy(__alloc, __first, __last);
   } else {
-    __builtin_memcpy(__result, __first, sizeof(_Tp) * (__last - __first));
+    __builtin_memcpy((void*)__result, __first, sizeof(_Tp) * (__last - __first));
----------------
serge-sans-paille wrote:

done!

https://github.com/llvm/llvm-project/pull/111434


More information about the cfe-commits mailing list