[PATCH] D149618: [clang][NFC] documents recent type trait primitives

Christopher Di Bella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 15:06:45 PDT 2023


cjdb created this revision.
cjdb added reviewers: aaron.ballman, erichkeane, shafik.
Herald added a project: All.
cjdb requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Depends on D149492 <https://reviews.llvm.org/D149492>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149618

Files:
  clang/docs/LanguageExtensions.rst


Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -1398,6 +1398,9 @@
 ``__X(...)`` has the same semantics and constraints as the corresponding
 ``std::X_t<...>`` or ``std::X_v<...>`` type trait.
 
+* ``__add_lvalue_reference(type)`` (C++)
+* ``__add_pointer(type)`` (C++)
+* ``__add_rvalue_reference(type)`` (C++)
 * ``__array_rank(type)`` (Embarcadero):
   Returns the number of levels of array in the type ``type``:
   ``0`` if ``type`` is not an array type, and
@@ -1409,6 +1412,7 @@
   Returns whether a class can be passed in registers under the current
   ABI. This type can only be applied to unqualified class types.
   This is not a portable type trait.
+* ``__decay(type)`` (C++)
 * ``__has_nothrow_assign`` (GNU, Microsoft, Embarcadero):
   Deprecated, use ``__is_nothrow_assignable`` instead.
 * ``__has_nothrow_move_assign`` (GNU, Microsoft):
@@ -1517,12 +1521,23 @@
   enumeration types if the underlying type was unsigned.
 * ``__is_void`` (C++, Embarcadero)
 * ``__is_volatile`` (C++, Embarcadero)
+* ``__make_signed(type)`` (C++)
+* ``__make_unsigned(type)`` (C++)
 * ``__reference_binds_to_temporary(T, U)`` (Clang):  Determines whether a
   reference of type ``T`` bound to an expression of type ``U`` would bind to a
   materialized temporary object. If ``T`` is not a reference type the result
   is false. Note this trait will also return false when the initialization of
   ``T`` from ``U`` is ill-formed.
-* ``__underlying_type`` (C++, GNU, Microsoft)
+* ``__remove_all_extents(type)`` (C++)
+* ``__remove_const(type)`` (C++)
+* ``__remove_cv(type)`` (C++)
+* ``__remove_cvref(type)`` (C++)
+* ``__remove_extent(type)`` (C++)
+* ``__remove_pointer(type)``(C++)
+* ``__remove_reference(type)`` (C++)
+* ``__remove_restrict(type)`` (C++)
+* ``__remove_volatile(type)`` (C++)
+* ``__underlying_type(type)`` (C++, GNU, Microsoft)
 
 In addition, the following expression traits are supported:
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149618.518573.patch
Type: text/x-patch
Size: 2053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230501/b5b0c8ff/attachment.bin>


More information about the cfe-commits mailing list