[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 27 09:21:53 PDT 2024


================
@@ -1126,9 +1126,6 @@ class QualType {
   /// Return true if this is a trivially relocatable type.
   bool isTriviallyRelocatableType(const ASTContext &Context) const;
 
-  /// Return true if this is a trivially equality comparable type.
-  bool isTriviallyEqualityComparableType(const ASTContext &Context) const;
----------------
AaronBallman wrote:

Well shoot! That's... frustrating. What about splitting the logic between `Type` and `Sema`? e.g., `Type` tracks whether the type *in isolation* is trivially equality comparable, and `Sema` can use that to early return if a type is not trivially equality comparable in isolation and do additional semantic checking otherwise to provide the value for the trait.

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


More information about the cfe-commits mailing list