diff options
author | Mark de Wever <koraq@xs4all.nl> | 2024-02-03 17:23:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-03 17:23:31 +0100 |
commit | 5ca2777c69f8708d583e230c56ac7f5f6376fb40 (patch) | |
tree | 8add98b070c0627e95bd9d0433ee6e5240a64dac /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 47abbf4fe956ad1c12832de03c8ae3294eb5cb78 (diff) | |
download | llvm-5ca2777c69f8708d583e230c56ac7f5f6376fb40.zip llvm-5ca2777c69f8708d583e230c56ac7f5f6376fb40.tar.gz llvm-5ca2777c69f8708d583e230c56ac7f5f6376fb40.tar.bz2 |
[libc++] Fixes valarray proxy type compound assignment operations. (#76528)
The valarray<>::operator[](...) const functions return proxy objects.
The valarray<>::operator[](...) functions return valarray objects.
However the standard allows functions returning valarray objects to
return custom proxy objects instead. Libc++ returns __val_expr proxies.
Functions taking a valarray object must work with the custom proxies
too. Therefore several operations have a custom proxy overload instead
of valarray overloads.
Libc++ doesn't specify a valarray overload. This is an issue with the
standard proxy types; these can implicitly be converted to a valarray.
The solution is to allow the standard proxies to behave as-if they are
custom proxies.
This patch fixes the valarray compound assignments. Other operations,
like the binary non-member functions are not fixed. These will be done
in a followup patch.
Fixes: https://github.com/llvm/llvm-project/issues/21320
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions