Commit af4c589e by Derek Mauro Committed by Copybara-Service

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
parent 074a32af
...@@ -816,8 +816,11 @@ ...@@ -816,8 +816,11 @@
// //
// See also the upstream documentation: // See also the upstream documentation:
// https://clang.llvm.org/docs/AttributeReference.html#lifetimebound // 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) #if ABSL_HAVE_CPP_ATTRIBUTE(clang::lifetimebound)
#define ABSL_ATTRIBUTE_LIFETIME_BOUND [[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) #elif ABSL_HAVE_ATTRIBUTE(lifetimebound)
#define ABSL_ATTRIBUTE_LIFETIME_BOUND __attribute__((lifetimebound)) #define ABSL_ATTRIBUTE_LIFETIME_BOUND __attribute__((lifetimebound))
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment