Page MenuHomeFreeBSD

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

Authored by arichardson on Sep 14 2025, 11:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 17, 3:05 AM
Unknown Object (File)
Sat, Jun 13, 9:00 AM
Unknown Object (File)
Thu, Jun 4, 5:38 PM
Unknown Object (File)
May 16 2026, 11:09 AM
Unknown Object (File)
May 16 2026, 11:09 AM
Unknown Object (File)
May 15 2026, 5:15 PM
Unknown Object (File)
May 15 2026, 2:35 PM
Unknown Object (File)
May 15 2026, 1:07 PM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable