[libcxx-commits] [PATCH] D91708: [libcxx] Add some missing _VSTD:: to <vector>, with a regression test.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 18 16:03:44 PST 2020
Quuxplusone updated this revision to Diff 306249.
Quuxplusone added a comment.
Sorry, @ldionne, I've got a better test now, and more proposed _VSTDs!
I hacked my local "test_allocator.h" to use this "AdlTrap" trick, and discovered a few more places where ADL calls were being made. I don't propose to commit the test_allocator stuff, because a container using such an allocator breaks //all// ADL calls, including simple stuff like `vec1 == vec2`. But it was a fun experiment!
I have this as three commits locally; should I land them as three commits, or as one commit?
commit 57f653ea4d12d97d3a352df253425763da803486 (HEAD -> add-vstd)
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date: Wed Nov 18 09:00:56 2020 -0500
[libc++] Add some more missing _VSTD:: to <vector>, with a regression test.
This is cleanup after d9a4f936d05.
Note that a vector whose allocator runs afoul of the unqualified code here, will
likely also run afoul of simple things like `v1 == v2` (which is also an ADL call).
Relevant blog post: https://quuxplusone.github.io/blog/2019/09/26/uglification-doesnt-stop-adl/
Differential Revision: https://reviews.llvm.org/D91708
commit 53b5db385145ba924db3a0d5d41758e22c288f46
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date: Wed Nov 18 18:39:14 2020 -0500
[libc++] Add _VSTD:: qualification to __swap_allocator.
Relevant blog post: https://quuxplusone.github.io/blog/2019/09/26/uglification-doesnt-stop-adl/
Differential Revision: https://reviews.llvm.org/D91708
commit 915d293f0fd6a73dd8daa90b7df5f66d81b54ddd
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date: Wed Nov 18 18:54:38 2020 -0500
[libc++] Add _VSTD:: qualification consistently to __to_address.
Relevant blog post: https://quuxplusone.github.io/blog/2019/09/26/uglification-doesnt-stop-adl/
Differential Revision: https://reviews.llvm.org/D91708
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91708/new/
https://reviews.llvm.org/D91708
Files:
libcxx/include/__hash_table
libcxx/include/__split_buffer
libcxx/include/__tree
libcxx/include/deque
libcxx/include/forward_list
libcxx/include/list
libcxx/include/memory
libcxx/include/string
libcxx/include/vector
libcxx/test/libcxx/containers/sequences/vector/robust_against_adl.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91708.306249.patch
Type: text/x-patch
Size: 10839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201119/73132179/attachment-0001.bin>
More information about the libcxx-commits
mailing list