mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 06:56:08 +00:00

This patch implements https://wg21.link/P2747R2. The library changes affect direct `operator new` and `operator new[]` calls even when the core language changes are absent. The changes are not available for MS ABI because the `operator new` and `operator new[]` are from VCRuntime's `<vcruntime_new.h>`. A feature request was submitted for that [1]. As a drive-by change, the patch reformatted the whole `new.pass.cpp` and `new_array.pass.cpp` tests. Closes #105427 [1]: https://developercommunity.visualstudio.com/t/constexpr-for-placement-operator-newope/10730304.