HomeFreeBSD

libc++: silence -Wnontrivial-memaccess warning with newer clang

Description

libc++: silence -Wnontrivial-memaccess warning with newer clang

Apply part of LLVM commit 71315698c91d0cda054b903da0594ca6f072c350 to
silence the -Wnontrivial-memaccess warning that is triggered any time
this function is instantiated by user code. This fixes another
buildworld failure with Clang HEAD.

Original commit message:
[clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434)
This implements a warning that's similar to what GCC does in that
context: both memcpy and memset require their first and second operand
to be trivially copyable, let's warn if that's not the case.

Reviewed by: emaste, dim
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52534

Details

Provenance
arichardsonAuthored on Sep 15 2025, 10:14 PM
Reviewer
emaste
Differential Revision
D52534: libc++: silence -Wnontrivial-memaccess warning with newer clang
Parents
rG086ce467adec: libc++: Fix deprecation warnings with latest clang
Branches
Unknown
Tags
Unknown