llvm-project/libcxx/test/std/numerics
Louis Dionne b8f6f9e741 [libc++] Avoid creating temporaries in unary expressions involving valarray
Currently, unary expressions involving valarray will create a temporary.
This leads to dangling references in expressions like `-a * b`, because
`-a` is a temporary and the resulting expression will refer to it. This
patch fixes the problem by creating a lazy expression to perform the unary
operation instead of eagerly creating a temporary valarray. This is
permitted by the Standard, which does not specify the exact type of
most expressions involving valarrays.

This is technically an ABI break, however I believe the actual potential
for breakage is very low.

rdar://90152242

Differential Revision: https://reviews.llvm.org/D125019
2022-06-06 12:58:23 -04:00
..
bit [libcxx] Disable long double -> int128 test with msan 2022-04-25 10:42:10 -07:00
c.math [libc++] Add warning pragma macros in the test suite 2022-03-17 00:11:20 +01:00
cfenv/cfenv.syn [libc++] Remove obsolete 'newlib' Lit Feature 2020-06-12 14:08:18 -04:00
complex.number [runtimes] Rename various libcpp-has-no-XYZ Lit features to just no-XYZ 2022-05-27 15:24:45 -04:00
numarray [libc++] Avoid creating temporaries in unary expressions involving valarray 2022-06-06 12:58:23 -04:00
numbers [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
numeric.ops [libc++] Remove unused __functional includes 2022-05-28 10:12:39 +02:00
numeric.requirements
numerics.general
rand [runtimes] Rename various libcpp-has-no-XYZ Lit features to just no-XYZ 2022-05-27 15:24:45 -04:00