[all-commits] [llvm/llvm-project] db2eb4: [libc++] Simplify std::launder (#147985)
Nikolas Klauser via All-commits
all-commits at lists.llvm.org
Wed Jul 16 00:42:30 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: db2eb4d031028f9ad9b9ad6f6283f81598a404f0
https://github.com/llvm/llvm-project/commit/db2eb4d031028f9ad9b9ad6f6283f81598a404f0
Author: Nikolas Klauser <nikolasklauser at berlin.de>
Date: 2025-07-16 (Wed, 16 Jul 2025)
Changed paths:
M libcxx/include/__new/launder.h
M libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.verify.cpp
Log Message:
-----------
[libc++] Simplify std::launder (#147985)
Both Clang and GCC diagnose invalid calls to `__builtin_launder`, which
causes duplicate diagnostics when using `std::launder` in an invalid
way. While the diagnostic message for the builtin isn't perferct, it's
definitely good enough to understand the problem and adding our own
diagnostic doesn't really make things any clearer. Because of that, this
patch simply removes the `static_assert`s and lets the compiler handle
diagnosing incorrect arguments instead. This not only simplifies our
implementation, but also improves compile times a bit, since we avoid
instantiating some type traits.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list