This revision is part of our efforts to support container annotations with (almost) every allocator.
That patch is necessary to enable support for most annotations (D136765). Without a way to turn off annotations, it's hard to use ASan with area allocators (no calls to destructors).
This is an answer to a request about it. This patch provides a solution to the aforementioned issue by introducing a new template structure __asan_annotate_container_with_allocator, which allows the disabling of container annotations for a specific allocator.
This patch also introduces _LIBCPP_HAS_ASAN_CONTAINER_ANNOTATIONS_FOR_ALL_ALLOCATORS FTM.
To turn off annotations, it is sufficient to create a template specialization with a false value using a Unary Type Trait.
The proposed structure is being used in the code enabling annotations for all allocators in std::vector, std::basic_string, and std::deque. (D136765 D146214 D146815)
Possibility to do it was added to ASan API in rGdd1b7b797a116eed588fd752fbe61d34deeb24e4 commit.
For context on not calling a destructor, look at https://eel.is/c++draft/basic.life#5 and notes there, you may also read a discussion in D136765.
When this lands, it should probably have a link from the release notes.