[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 08:39:12 PDT 2024


https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/88528

Currently `__is_trivially_equality_comparable` is documented to return true if comparing the value representation is equivalent to calling the comparison operator, which is not quite what the trait actually checks. The traits actually checks that comparing the object representation is equivalent, which means that there cannot be padding bytes in the type.



>From d4cf4c22b40236856d873bf2080060db790a3538 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 12 Apr 2024 17:36:53 +0200
Subject: [PATCH] [Clang] Fix __is_trivially_equaltiy_comparable documentation

---
 clang/docs/LanguageExtensions.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 7b23e4d1c2f30c..a6942464de5d35 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -1640,7 +1640,7 @@ The following type trait primitives are supported by Clang. Those traits marked
   were made trivially relocatable via the ``clang::trivial_abi`` attribute.
 * ``__is_trivially_equality_comparable`` (Clang): Returns true if comparing two
   objects of the provided type is known to be equivalent to comparing their
-  value representations.
+  object representations.
 * ``__is_unbounded_array`` (C++, GNU, Microsoft, Embarcadero)
 * ``__is_union`` (C++, GNU, Microsoft, Embarcadero)
 * ``__is_unsigned`` (C++, Embarcadero):



More information about the cfe-commits mailing list