================ @@ -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:
It's unfortunate that the other traits are implemented directly on `Type` but this one is in SemaExprCXX.cpp and isn't possible to compute without access to `Sema`. ISTM we should be able to answer this question on the type rather than requiring semantic analysis (considering potential uses like in clang-tidy where there is no `Sema` available). Perhaps another way to approach this is with the `DefinitionData` for classes -- as we add members to the class, we build up information about whether something is trivially copyable, etc and store that on the bits defined in `CXXRecordDeclDefinitionBits.def`. Maybe we could do the same for equality comparable types, then we can leave this interface in `Type` and do special handling if the type is a `CXXRecordDecl`. WDYT? https://github.com/llvm/llvm-project/pull/93113 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits