[all-commits] [llvm/llvm-project] 580109: [libc++] Fix bug in allocate_shared_for_overwrite
Louis Dionne via All-commits
all-commits at lists.llvm.org
Mon Feb 13 05:51:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5801090258011cfe636cda1493ac9bc07fb2a889
https://github.com/llvm/llvm-project/commit/5801090258011cfe636cda1493ac9bc07fb2a889
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
M libcxx/docs/Status/Cxx20Issues.csv
M libcxx/include/__memory/construct_at.h
M libcxx/include/__memory/shared_ptr.h
M libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_for_overwrite.pass.cpp
M libcxx/test/support/test_allocator.h
Log Message:
-----------
[libc++] Fix bug in allocate_shared_for_overwrite
Instead of destroying the object with allocator::destroy, we must
call its destructor directly. As a fly-by also mark LWG3008 as
fixed since it is handled by our implementation.
This was pointed out by Tim Song in https://reviews.llvm.org/D140913.
Differential Revision: https://reviews.llvm.org/D143791
More information about the All-commits
mailing list