[clang] [clang]Implement the c23 stdc bit builtins (PR #185978)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 10 11:23:53 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)))
----------------
enh-google wrote:
fwiw, bionic already doesn't have symbols for any of these (and some other similar functions), and has no plans to add them.
even in the rare cases where we do, we basically just do the usual trick:
```
// .h
#define foo(x) (__builtin_foo((x)))
// .cpp
T (foo)(T x) { return foo(x); }
```
so this would be fine for us.
https://github.com/llvm/llvm-project/pull/185978
More information about the cfe-commits
mailing list