[Follow-on from proposing this in Dana's thread about [[clang::attributes]].]
I propose that, for all ABSL_ATTRIBUTE_* we care about (current or future), we either:
* Use a standardized C++ attribute directly (where possible)
* Define a non-prefixed macro in base/compiler_specific.h; have the implementation prefer C++-standard [[clang::xxx]] or similar syntax over __attribute__((xxx)) (where possible)
...and then ban direct use of the ABSL_ versions.
This would affect very few files today (<20). We currently use the following ABSL_ATTTRIBUTEs:
_LIFETIME_BOUND (most of them)
_WEAK
_NO_TAIL_CALL
_PACKED
_RETURNS_NONNULL
Dana has also expressed interest in future use of _PURE_FUNCTION and _CONST_FUNCTION.
Motivation: The ABSL_ macros are much longer and have a harder-to-remember #include. They also tend to be based on __attribute__(()) even when [[]] would be available, leading to usage that has to be tweaked if later migrated to C++ attribute syntax.
I propose the following names, start your bikesheds:
LIFETIME_BOUND
WEAK_SYMBOL
DISABLE_TAIL_CALLS
PACKED_OBJ
RETURNS_NONNULL
PURE_FUNCTION
CONST_FUNCTION
PK