[clang] [Clang][NFC] Apply code font throughout LanguageExtensions.md (PR #246604)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 27 02:23:52 PST 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Jan Schultke (eisenwave)
<details>
<summary>Changes</summary>
---
Patch is 72.49 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/246604.diff
1 Files Affected:
- (modified) clang/docs/LanguageExtensions.md (+162-162)
``````````diff
diff --git a/clang/docs/LanguageExtensions.md b/clang/docs/LanguageExtensions.md
index 21299f45545e0e..0259e7ec900b3e 100644
--- a/clang/docs/LanguageExtensions.md
+++ b/clang/docs/LanguageExtensions.md
@@ -419,12 +419,12 @@ option for a warning and returns `true` if that is a valid warning option.
## Implementation-defined keywords
-### \_\_datasizeof
+### `__datasizeof`
`__datasizeof` behaves like `sizeof`, except that it returns the size of the
type ignoring tail padding.
-### \_BitInt, \_ExtInt
+### `_BitInt`, `_ExtInt`
Clang supports the C23 `_BitInt(N)` feature as an extension in older C modes
and in C++. This type was previously implemented in Clang with the same
@@ -440,65 +440,65 @@ Clang supports `_Alignas`, `_Alignof`, `_Atomic`, `_Complex`,
`_Generic`, `_Imaginary`, `_Noreturn`, `_Static_assert`,
`_Thread_local`, and `_Float16` in all language modes with the C semantics.
-### \_\_alignof, \_\_alignof\_\_
+### `__alignof`, `__alignof__`
`__alignof` and `__alignof__` return, in contrast to `_Alignof` and
`alignof`, the preferred alignment of a type. This may be larger than the
required alignment for improved performance.
-### \_\_extension\_\_
+### `__extension__`
`__extension__` suppresses extension diagnostics in the statement it is
prepended to.
-### \_\_auto_type
+### `__auto_type`
`__auto_type` behaves the same as `auto` in C++11 but is available in all
language modes.
-### \_\_imag, \_\_imag\_\_
+### `__imag`, `__imag__`
`__imag` and `__imag__` can be used to get the imaginary part of a complex
value.
-### \_\_real, \_\_real\_\_
+### `__real`, `__real__`
`__real` and `__real__` can be used to get the real part of a complex value.
-### \_\_asm, \_\_asm\_\_
+### `__asm`, `__asm__`
`__asm` and `__asm__` are alternate spellings for `asm`, but available in
all language modes.
-### \_\_complex, \_\_complex\_\_
+### `__complex`, `__complex__`
`__complex` and `__complex__` are alternate spellings for `_Complex`.
-### \_\_const, \_\_const\_\_, \_\_volatile, \_\_volatile\_\_, \_\_restrict, \_\_restrict\_\_
+### `__const`, `__const__`, `__volatile`, `__volatile__`, `__restrict`, `__restrict__`
These are alternate spellings for their non-underscore counterparts, but are
available in all language modes.
-### \_\_decltype
+### `__decltype`
`__decltype` is an alternate spelling for `decltype`, but is also available
in C++ modes before C++11.
-### \_\_inline, \_\_inline\_\_
+### `__inline`, `__inline__`
`__inline` and `__inline__` are alternate spellings for `inline`, but are
available in all language modes.
-### \_\_nullptr
+### `__nullptr`
`__nullptr` is an alternate spelling for `nullptr`. It is available in all C and C++ language modes.
-### \_\_signed, \_\_signed\_\_
+### `__signed`, `__signed__`
`__signed` and `__signed__` are alternate spellings for `signed`.
`__unsigned` and `__unsigned__` are **not** supported.
-### \_\_typeof, \_\_typeof\_\_, \_\_typeof_unqual, \_\_typeof_unqual\_\_
+### `__typeof`, `__typeof__`, `__typeof_unqual`, `__typeof_unqual__`
`__typeof` and `__typeof__` are alternate spellings for `typeof`, but are
available in all language modes. These spellings result in the operand,
@@ -508,7 +508,7 @@ retaining all qualifiers.
C23 `typeof_unqual` type specifier, but are available in all language modes.
These spellings result in the type of the operand, stripping all qualifiers.
-### \_\_char16_t, \_\_char32_t
+### `__char16_t`, `__char32_t`
`__char16_t` and `__char32_t` are alternate spellings for `char16_t` and
`char32_t` respectively, but are also available in C++ modes before C++11.
@@ -664,22 +664,22 @@ specification.
| Operator | OpenCL | AltiVec | GCC | NEON | SVE | RVV |
| --- | --- | --- | --- | --- | --- | --- |
-| [] | yes | yes | yes | yes | yes | yes |
-| unary operators +, -- | yes | yes | yes | yes | yes | yes |
-| ++, -- -- | yes | yes | yes | no | no | no |
-| +,--,*,/,% | yes | yes | yes | yes | yes | yes |
-| bitwise operators &,\|,^,~ | yes | yes | yes | yes | yes | yes |
-| >>,<< | yes | yes | yes | yes | yes | yes |
-| !, &&, \|\| | yes | -- | yes | yes | yes | yes |
-| ==, !=, >, <, >=, <= | yes | yes | yes | yes | yes | yes |
-| = | yes | yes | yes | yes | yes | yes |
-| ?: <a class="footnote-reference brackets" href="#id5" id="id1" role="doc-noteref">[1]</a> | yes | -- | yes | yes | yes | yes |
-| sizeof | yes | yes | yes | yes | yes <a class="footnote-reference brackets" href="#vls" id="id2" role="doc-noteref">[2]</a> | yes <a class="footnote-reference brackets" href="#vls" id="id3" role="doc-noteref">[2]</a> |
+| `[]` | yes | yes | yes | yes | yes | yes |
+| unary operators `+`, `-` | yes | yes | yes | yes | yes | yes |
+| `++`, `--` | yes | yes | yes | no | no | no |
+| `+`,`-`,`*`,`/`,`%` | yes | yes | yes | yes | yes | yes |
+| bitwise operators `&`,`\|`,`^`,`~` | yes | yes | yes | yes | yes | yes |
+| `>>`,`<<` | yes | yes | yes | yes | yes | yes |
+| `!`, `&&`, `\|\|` | yes | -- | yes | yes | yes | yes |
+| `==`, `!=`, `>`, `<`, `>=`, `<=` | yes | yes | yes | yes | yes | yes |
+| `=` | yes | yes | yes | yes | yes | yes |
+| `?:` <a class="footnote-reference brackets" href="#id5" id="id1" role="doc-noteref">[1]</a> | yes | -- | yes | yes | yes | yes |
+| `sizeof` | yes | yes | yes | yes | yes <a class="footnote-reference brackets" href="#vls" id="id2" role="doc-noteref">[2]</a> | yes <a class="footnote-reference brackets" href="#vls" id="id3" role="doc-noteref">[2]</a> |
| C-style cast | yes | yes | yes | no | no | yes |
-| reinterpret_cast | yes | no | yes | no | no | yes |
-| static_cast | yes | no | yes | no | no | yes |
-| const_cast | no | no | no | no | no | no |
-| address &v[i] | no | no | no <a class="footnote-reference brackets" href="#id6" id="id4" role="doc-noteref">[3]</a> | no | no | no |
+| `reinterpret_cast` | yes | no | yes | no | no | yes |
+| `static_cast` | yes | no | yes | no | no | yes |
+| `const_cast` | no | no | no | no | no | no |
+| address `&v[i]` | no | no | no <a class="footnote-reference brackets" href="#id6" id="id4" role="doc-noteref">[3]</a> | no | no | no |
Both SVE and RVV define sizeless vector types which cannot be used in globals,
structs, unions, or arrays. Both provide an attribute (`arm_sve_vector_bits`
@@ -758,56 +758,56 @@ of different sizes and signs is forbidden in binary and ternary builtins.
| Name | Operation | Supported element types |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- |
-| T \_\_builtin_elementwise_abs(T x) | return the absolute value of a number x; the absolute value of the most negative integer remains the most negative integer | signed integer and floating point types |
-| T \_\_builtin_elementwise_fma(T x, T y, T z) | fused multiply add, (x * y) + z. | floating point types |
-| T \_\_builtin_elementwise_ceil(T x) | return the smallest integral value greater than or equal to x | floating point types |
-| T \_\_builtin_elementwise_sin(T x) | return the sine of x interpreted as an angle in radians | floating point types |
-| T \_\_builtin_elementwise_cos(T x) | return the cosine of x interpreted as an angle in radians | floating point types |
-| T \_\_builtin_elementwise_tan(T x) | return the tangent of x interpreted as an angle in radians | floating point types |
-| T \_\_builtin_elementwise_asin(T x) | return the arcsine of x interpreted as an angle in radians | floating point types |
-| T \_\_builtin_elementwise_acos(T x) | return the arccosine of x interpreted as an angle in radians | floating point types |
-| T \_\_builtin_elementwise_atan(T x) | return the arctangent of x interpreted as an angle in radians | floating point types |
-| T \_\_builtin_elementwise_atan2(T y, T x) | return the arctangent of y/x | floating point types |
-| T \_\_builtin_elementwise_sinh(T x) | return the hyperbolic sine of angle x in radians | floating point types |
-| T \_\_builtin_elementwise_cosh(T x) | return the hyperbolic cosine of angle x in radians | floating point types |
-| T \_\_builtin_elementwise_tanh(T x) | return the hyperbolic tangent of angle x in radians | floating point types |
-| T \_\_builtin_elementwise_floor(T x) | return the largest integral value less than or equal to x | floating point types |
-| T \_\_builtin_elementwise_log(T x) | return the natural logarithm of x | floating point types |
-| T \_\_builtin_elementwise_log2(T x) | return the base 2 logarithm of x | floating point types |
-| T \_\_builtin_elementwise_log10(T x) | return the base 10 logarithm of x | floating point types |
-| T \_\_builtin_elementwise_popcount(T x) | return the number of 1 bits in x | integer types |
-| T \_\_builtin_elementwise_pow(T x, T y) | return x raised to the power of y | floating point types |
-| T \_\_builtin_elementwise_bitreverse(T x) | return the integer represented after reversing the bits of x | integer types |
-| T \_\_builtin_elementwise_exp(T x) | returns the base-e exponential, e^x, of the specified value | floating point types |
-| T \_\_builtin_elementwise_exp2(T x) | returns the base-2 exponential, 2^x, of the specified value | floating point types |
-| T \_\_builtin_elementwise_exp10(T x) | returns the base-10 exponential, 10^x, of the specified value | floating point types |
-| T \_\_builtin_elementwise_ldexp(T x, IntT y) | returns the product of x and 2 raised to the power y. y must be an integer type matching the shape of x. | T: floating point types, IntT: integer types |
-| T \_\_builtin_elementwise_sqrt(T x) | return the square root of a floating-point number | floating point types |
-| T \_\_builtin_elementwise_roundeven(T x) | round x to the nearest integer value in floating point format, rounding halfway cases to even (that is, to the nearest value that is an even integer), regardless of the current rounding direction. | floating point types |
-| T \_\_builtin_elementwise_round(T x) | round x to the nearest integer value in floating point format, rounding halfway cases away from zero, regardless of the current rounding direction. May raise floating-point exceptions. | floating point types |
-| T \_\_builtin_elementwise_trunc(T x) | return the integral value nearest to but no larger in magnitude than x | floating point types |
-| T \_\_builtin_elementwise_nearbyint(T x) | round x to the nearest integer value in floating point format, rounding according to the current rounding direction. May not raise the inexact floating-point exception. This is treated the same as `__builtin_elementwise_rint` unless {ref}`FENV_ACCESS is enabled <floating-point-environment>`. | floating point types |
-| T \_\_builtin_elementwise_rint(T x) | round x to the nearest integer value in floating point format, rounding according to the current rounding direction. May raise floating-point exceptions. This is treated the same as `__builtin_elementwise_nearbyint` unless {ref}`FENV_ACCESS is enabled <floating-point-environment>`. | floating point types |
-| T \_\_builtin_elementwise_canonicalize(T x) | return the platform specific canonical encoding of a floating-point number | floating point types |
-| T \_\_builtin_elementwise_copysign(T x, T y) | return the magnitude of x with the sign of y. | floating point types |
-| T \_\_builtin_elementwise_fmod(T x, T y) | return the floating-point remainder of (x/y) whose sign matches the sign of x. ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/246604
More information about the cfe-commits
mailing list