[libc-commits] [libc] [libc] add `LLVM_LIBC_CAST` macro. (PR #127319)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Sat Feb 15 16:30:28 PST 2025
================
@@ -47,6 +47,9 @@
#define __NOEXCEPT throw()
#endif
+#undef LLVM_LIBC_CAST
+#define LLVM_LIBC_CAST(cast, type, value) (cast<type>(value))
----------------
frobtech wrote:
This merits a comment about its intended uses.
No macro should be defined in this file unless it's in the implementation namespace.
Sticking to the `__` prefix seems like the best convention, with the exception of the C11 keywords that are in the `_[A-Z]` part of the implementation namespace.
https://github.com/llvm/llvm-project/pull/127319
More information about the libc-commits
mailing list