[clang] [clang]Implement the c23 stdc bit builtins (PR #185978)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 10 08:58:16 PDT 2026
================
@@ -0,0 +1,19 @@
+#ifndef LLVM_CLANG_TEST_STDBIT_H
+#define LLVM_CLANG_TEST_STDBIT_H
+
+#define stdc_leading_zeros(x) (__builtin_stdc_leading_zeros((x)))
----------------
AaronBallman wrote:
CC @michaelrj-google @enh-google for more opinions on whether this looks sufficiently similar to what libc implementations will do in practice. I don't think this is accurate though because there's no external symbol to get a function pointer from; I would have expected this to be using `_Generic`.
https://github.com/llvm/llvm-project/pull/185978
More information about the cfe-commits
mailing list