[clang] [Clang] Make enums trivially equality comparable (PR #133587)

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 26 13:38:03 PDT 2025


halbi2 wrote:

@philnik777 Is anything else blocking this patch to fix #132672? Could you just change the commit message to what @shafik suggested and merge it please?

> [clang] Make enums trivially equality comparable
>
> std::equal(std::byte) currently has sub-optimal codegen due to enum types not being recognized as trivially comparable. In order to fix this we make them trivially comparable. In the process I factored out into a standalone function EqualityComparisonIsDefaulted.

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


More information about the cfe-commits mailing list