================
@@ -5240,9 +5249,13 @@ static bool 
HasNonDeletedDefaultedEqualityComparison(Sema &S,
 static bool isTriviallyEqualityComparableType(Sema &S, QualType Type, 
SourceLocation KeyLoc) {
   QualType CanonicalType = Type.getCanonicalType();
   if (CanonicalType->isIncompleteType() || CanonicalType->isDependentType() ||
-      CanonicalType->isEnumeralType() || CanonicalType->isArrayType())
+      CanonicalType->isArrayType())
     return false;
 
+  if (CanonicalType->isEnumeralType())
+    return EqualityComparisonIsDefaulted(
----------------
shafik wrote:

It looks like you are currently only testing if it is defaulted, we should be 
testing all code paths if possible to insure this does what we expect and to 
prevent future regressions.

https://github.com/llvm/llvm-project/pull/133587
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to