[clang] [clang] Implement __builtin_stdc_rotate_left, __builtin_stdc_rotate_right (PR #160259)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 2 07:21:01 PDT 2025


================
@@ -3680,6 +3680,44 @@ the arguments. Both arguments and the result have the bitwidth specified
 by the name of the builtin. These builtins can be used within constant
 expressions.
 
+``__builtin_stdc_rotate_left`` and ``__builtin_stdc_rotate_right``
+------------------------------------------------------------------
+
+**Syntax**:
+
+.. code-block:: c
+
+    __builtin_stdc_rotate_left(value, count)
----------------
erichkeane wrote:

Please add 'type' of some sort to these, including return type.  As the types neednt be the same every time, we need to make it clear which would match though (that is, type of value is the same as the return type), and can do that with a placeholder.

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


More information about the cfe-commits mailing list