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
F150813071: D52534.id162120.diff
Sat, Apr 4, 5:40 AM
F150775211: D52534.id162027.diff
Fri, Apr 3, 11:42 PM
Unknown Object (File)
Tue, Mar 31, 9:12 PM
Unknown Object (File)
Mon, Mar 16, 8:25 AM
Unknown Object (File)
Sun, Mar 15, 8:16 PM
Unknown Object (File)
Sat, Mar 14, 10:59 AM
Unknown Object (File)
Feb 14 2026, 4:51 PM
Unknown Object (File)
Feb 14 2026, 4:50 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