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)
Tue, Oct 21, 3:56 AM
Unknown Object (File)
Sun, Oct 19, 3:26 AM
Unknown Object (File)
Wed, Oct 15, 10:28 AM
Unknown Object (File)
Fri, Oct 10, 10:11 PM
Unknown Object (File)
Fri, Oct 10, 10:11 PM
Unknown Object (File)
Fri, Oct 10, 10:11 PM
Unknown Object (File)
Fri, Oct 10, 4:14 PM
Unknown Object (File)
Fri, Oct 10, 1:25 AM
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