From 6a7f734fad1e5d6b6ec239fd7129922af345249a Mon Sep 17 00:00:00 2001 From: TCMalloc Team Date: Mon, 20 Jul 2026 04:56:26 -0700 Subject: [PATCH] Migrate explicit capture_by(this) annotations to new macro This CL migrates remaining explicitly written [[clang::lifetime_capture_by(this)]] and ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY(this) annotations outside of absl to instead use ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY_THIS inline with the llvm migration. LLVM commit reference: https://github.com/llvm/llvm-project/commit/a627e7e9c3cc9adab27b1e6ebfd70f40dccacf5c PiperOrigin-RevId: 950762270 --- tcmalloc/internal/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcmalloc/internal/config.h b/tcmalloc/internal/config.h index 93bb1f81f..f496bf44a 100644 --- a/tcmalloc/internal/config.h +++ b/tcmalloc/internal/config.h @@ -85,7 +85,7 @@ #define TCMALLOC_ATTRIBUTE_NO_DESTROY #endif -#define TCMALLOC_CAPTURED_BY_THIS ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY(this) +#define TCMALLOC_CAPTURED_BY_THIS ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY_THIS // TCMalloc uses asm goto with output constraints to optimize its per-CPU // implementation, avoiding an otherwise redundant branch.