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

via cfe-commits cfe-commits at lists.llvm.org
Wed May 22 16:53:06 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 465bfd41fa27383d93521a31458e6496ebfc590d 53b52a07f8720db4495b93099d3e1874453f6950 -- clang/include/clang/AST/Type.h clang/lib/AST/Type.cpp clang/lib/Sema/SemaExprCXX.cpp clang/test/SemaCXX/type-traits.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index ccf678e666..f220f91366 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -5200,7 +5200,7 @@ static bool HasNoThrowOperator(const RecordType *RT, OverloadedOperatorKind Op,
 }
 
 static bool
-HasNonDeletedDefaultedEqualityComparison(Sema& S, const CXXRecordDecl *Decl) {
+HasNonDeletedDefaultedEqualityComparison(Sema &S, const CXXRecordDecl *Decl) {
   if (Decl->isUnion())
     return false;
   if (Decl->isLambda())
@@ -5252,8 +5252,7 @@ HasNonDeletedDefaultedEqualityComparison(Sema& S, const CXXRecordDecl *Decl) {
          });
 }
 
-static bool isTriviallyEqualityComparableType(
-    Sema& S, QualType Type) {
+static bool isTriviallyEqualityComparableType(Sema &S, QualType Type) {
   QualType CanonicalType = Type.getCanonicalType();
   if (CanonicalType->isIncompleteType() || CanonicalType->isDependentType() ||
       CanonicalType->isEnumeralType() || CanonicalType->isArrayType())

``````````

</details>


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


More information about the cfe-commits mailing list