[clang] [clang]Implement the c23 stdc bit builtins (PR #185978)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 09:58:55 PDT 2026


================
@@ -797,6 +797,175 @@ def StdcRotateRight : Builtin {
   let Prototype = "void(...)";
 }
 
+def StdcLeadingZeros: Builtin {
+  let Spellings = ["__builtin_stdc_leading_zeros"];
+  let Attributes = [NoThrow, Const, Constexpr, CustomTypeChecking];
----------------
efriedma-quic wrote:

As long as our implementation satisfies "const", this is fine.

https://github.com/llvm/llvm-project/pull/185978


More information about the cfe-commits mailing list