aboutsummaryrefslogtreecommitdiff
path: root/absl/container/internal/counting_allocator.h
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@google.com>2022-07-12 21:47:19 -0400
committerBenjamin Barenblat <bbaren@google.com>2022-07-12 21:47:19 -0400
commitd055841ab4147dac20d5c46d04ca3a2fb13748b7 (patch)
tree15a01389c86f10a8844ff2a86bddf46640d065e8 /absl/container/internal/counting_allocator.h
parent2d23a3e16abfcf8f22ba850d67e972cc77e98874 (diff)
parent273292d1cfc0a94a65082ee350509af1d113344d (diff)
downloadabseil-d055841ab4147dac20d5c46d04ca3a2fb13748b7.tar.gz
abseil-d055841ab4147dac20d5c46d04ca3a2fb13748b7.tar.bz2
abseil-d055841ab4147dac20d5c46d04ca3a2fb13748b7.zip
Merge new upstream LTS 20220623.0
Diffstat (limited to 'absl/container/internal/counting_allocator.h')
-rw-r--r--absl/container/internal/counting_allocator.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/container/internal/counting_allocator.h b/absl/container/internal/counting_allocator.h
index 927cf082..66068a5a 100644
--- a/absl/container/internal/counting_allocator.h
+++ b/absl/container/internal/counting_allocator.h
@@ -80,7 +80,15 @@ class CountingAllocator {
template <typename U>
void destroy(U* p) {
Allocator allocator;
+ // Ignore GCC warning bug.
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
+#endif
AllocatorTraits::destroy(allocator, p);
+#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
+#pragma GCC diagnostic pop
+#endif
if (instance_count_ != nullptr) {
*instance_count_ -= 1;
}