summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-06-05 22:32:52 +0000
committerEric Fiselier <eric@efcs.ca>2018-06-05 22:32:52 +0000
commit8cef7fd75ac3cbeb8efb767e5ba2dcdb76bf4454 (patch)
tree1ba50be1285e73602ab0fd69f0c89eef23062683 /clang/lib/CodeGen/CGClass.cpp
parenta79b6b3ef0d814080680a84202570acf4425ee12 (diff)
downloadbcm5719-llvm-8cef7fd75ac3cbeb8efb767e5ba2dcdb76bf4454.tar.gz
bcm5719-llvm-8cef7fd75ac3cbeb8efb767e5ba2dcdb76bf4454.zip
Fix PR37694 - std::vector doesn't correctly move construct allocators.
C++2a[container.requirements.general]p8 states that when move constructing a container, the allocator is move constructed. Vector previously copy constructed these allocators. This patch fixes that bug. Additionally it cleans up some unnecessary allocator conversions when copy constructing containers. Libc++ uses __internal_allocator_traits::select_on_copy_construction to select the correct allocator during copy construction, but it unnecessarily converted the resulting allocator to the user specified allocator type and back. After this patch list and forward_list no longer do that. Technically we're supposed to be using allocator_traits<allocator_type>::select_on_copy_construction, but that should seemingly be addressed as a separate patch, if at all. llvm-svn: 334053
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud