This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333948: Fix a strict aliasing violation in map and
unordered_map. (authored by epilk, committed by ).
Herald added a subsc
rsmith added a comment.
In https://reviews.llvm.org/D47607#1118464, @EricWF wrote:
> One other concern I have is if there will be any performance impact to using
> `launder` all the time, but better safe than sorry.
In the short-to-medium term, I think we can tackle this by adding an attribute
erik.pilkington updated this revision to Diff 149449.
erik.pilkington marked 10 inline comments as done.
erik.pilkington added a comment.
Address review comments. Thanks!
https://reviews.llvm.org/D47607
Files:
libcxx/include/__hash_table
libcxx/include/__tree
libcxx/include/map
libcxx/i
erik.pilkington added a comment.
In https://reviews.llvm.org/D47607#1118547, @EricWF wrote:
> I should have asked, have we actually seen a midcompile caused by this? Is
> there a reproducer? Or is this purerly speculative?
Nope, pure speculation. I still think we should still fix this though.
EricWF added a comment.
I should have asked, have we actually seen a midcompile caused by this? Is
there a reproducer? Or is this purerly speculative?
Repository:
rCXX libc++
https://reviews.llvm.org/D47607
___
cfe-commits mailing list
cfe-commi
EricWF added inline comments.
Comment at: libcxx/include/unordered_map:586
union __hash_value_type
{
typedef _Key key_type;
`union` -> `class`
Repository:
rCXX libc++
https://reviews.llvm.org/D47607
_
EricWF added a comment.
Overall this change seems reasonable to me. Thanks for working on this.
Initially I was concerned we would hit issues optimizing const objects,
but I should have read your description first! Thanks for ensuring Clang
doesn't optimize on this.
One other concern I have is
rsmith added inline comments.
Comment at: libcxx/include/map:617
template
union __value_type
{
This doesn't need to be a union any more; change to class?
Comment at: libcxx/include/map:633
+#if _LIBCPP_STD_VER > 14
+return _VSTD::la
erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, EricWF, mclow.lists.
Herald added subscribers: christof, kosarev.
and define `__value_type` as a union between pair
and pair so that various operations can move into/from these pairs
[1]. This is a pretty blatant s