Files
clang-p2996/libc/utils/HdrGen/PublicAPICommand.cpp
Schrodinger ZHU Yifan 6cfbf8ccce [libc] add support for function level attributes (#79891)
See discussion at
https://discourse.llvm.org/t/rfc-support-function-attributes-in-user-interface/76624

Demo macro:
```c++
#if !defined(__LIBC_CONST_ATTR) && defined(__cplusplus) && defined(__GNUC__)
#if __has_attribute(const)
#define __LIBC_CONST_ATTR [[gnu::const]]
#endif
#endif
#if !defined(__LIBC_CONST_ATTR) && defined(__GNUC__)
#if __has_attribute(const)
#define __LIBC_CONST_ATTR __attribute__((const))
#endif
#endif
#if !defined(__LIBC_CONST_ATTR)
#define __LIBC_CONST_ATTR
#endif
```
2024-02-15 12:20:53 -05:00

12 KiB