[PATCH] D66646: Ensure that statements, expressions and types are trivially destructible with a static_assert

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 23 11:10:04 PDT 2019


lebedev.ri added a comment.

In D66646#1642730 <https://reviews.llvm.org/D66646#1642730>, @riccibruno wrote:

> In D66646#1642708 <https://reviews.llvm.org/D66646#1642708>, @lebedev.ri wrote:
>
> > SGTM, but i wonder if this should be done one level up, in `BumpPtrAllocator` itself?
>
>
> I don't understand. `BumpPtrAllocator` is only used to allocate raw memory and doesn't know anything about how it is going to be used.


I was looking at `SpecificBumpPtrAllocator`, which knows it's type.
But if i look down the indirection, i think `AllocatorBase::Allocate<T>()`/`AllocatorBase::Deallocate<T>()` is the place.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66646/new/

https://reviews.llvm.org/D66646





More information about the cfe-commits mailing list