diff options
author | Derek Mauro <dmauro@google.com> | 2024-07-07 12:35:47 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-07-07 12:36:41 -0700 |
commit | af4c589ed6f312372bb02bfaacb62c14598ceb04 (patch) | |
tree | 7611eb5e9525e9a004a13f8f39d3ba11269504ae | |
parent | 074a32af66648c74dd0104e251e44ace5b59f7fa (diff) |
Add an MSVC implementation of ABSL_ATTRIBUTE_LIFETIME_BOUND
https://learn.microsoft.com/en-us/cpp/code-quality/c26816?view=msvc-170
PiperOrigin-RevId: 650044473
Change-Id: I2bf31f1e4b972e890194d21c5a6dcb4ee9993484
-rw-r--r-- | absl/base/attributes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h index 5acbdb6c..5ea5ee3e 100644 --- a/absl/base/attributes.h +++ b/absl/base/attributes.h @@ -816,8 +816,11 @@ // // See also the upstream documentation: // https://clang.llvm.org/docs/AttributeReference.html#lifetimebound +// https://learn.microsoft.com/en-us/cpp/code-quality/c26816?view=msvc-170 #if ABSL_HAVE_CPP_ATTRIBUTE(clang::lifetimebound) #define ABSL_ATTRIBUTE_LIFETIME_BOUND [[clang::lifetimebound]] +#elif ABSL_HAVE_CPP_ATTRIBUTE(msvc::lifetimebound) +#define ABSL_ATTRIBUTE_LIFETIME_BOUND [[msvc::lifetimebound]] #elif ABSL_HAVE_ATTRIBUTE(lifetimebound) #define ABSL_ATTRIBUTE_LIFETIME_BOUND __attribute__((lifetimebound)) #else |