diff options
author | Hans Wennborg <hans@chromium.org> | 2024-05-03 11:41:14 -0700 |
---|---|---|
committer | chromeos-ci-prod <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> | 2024-05-04 04:19:34 -0700 |
commit | 6aac704ce5523927c1aed6023be0f86624282127 (patch) | |
tree | 1ee0618d82114b56ab98eff54597a9358c7ee319 | |
parent | 215ac2b2198068ce48879f80308dfab15b3a9cf7 (diff) | |
download | libchrome-6aac704ce5523927c1aed6023be0f86624282127.tar.gz |
Fix NoDestructor::PlacementStorage::get() const
It was trying to call a storage() method, which doesn't exist in
PlacementStorage. This was uncovered by a recent Clang change:
https://github.com/llvm/llvm-project/pull/90152
Bug: 338536260
Change-Id: I74d06f46891f92645cee52a224379091e66a9627
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515154
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1296238}
CrOS-Libchrome-Original-Commit: 23646607e16c63231ae9f49ce5355c270145cf30
-rw-r--r-- | base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h index 5bea83e22e..2daa62ceef 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h @@ -122,9 +122,7 @@ class NoDestructor { new (storage_) T(std::forward<Args>(args)...); } - const T* get() const { - return const_cast<PlacementStorage*>(this)->storage(); - } + const T* get() const { return const_cast<PlacementStorage*>(this)->get(); } T* get() { return reinterpret_cast<T*>(storage_); } private: |