[clang] [Clang] Make enums trivially equality comparable (PR #133587)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 29 07:25:17 PDT 2025
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 HEAD~1 HEAD --extensions 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 d4a9900d3..0b04996ff 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -5202,7 +5202,8 @@ static bool EqualityComparisonIsDefaulted(Sema &S, const TypeDecl *Decl,
if (!Callee->isDefaulted())
return false;
if (!ParamT->isReferenceType()) {
- if (const CXXRecordDecl * RD = dyn_cast<CXXRecordDecl>(Decl); !RD->isTriviallyCopyable())
+ if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(Decl);
+ !RD->isTriviallyCopyable())
return false;
}
if (ParamT.getNonReferenceType()->getUnqualifiedDesugaredType() !=
``````````
</details>
https://github.com/llvm/llvm-project/pull/133587
More information about the cfe-commits
mailing list