diff --git a/toolchain/sem_ir/entity_name.h b/toolchain/sem_ir/entity_name.h index bd75b99cc3b3..63239a80214c 100644 --- a/toolchain/sem_ir/entity_name.h +++ b/toolchain/sem_ir/entity_name.h @@ -21,6 +21,9 @@ struct EntityName : public Printable { friend auto CarbonHashtableEq(const EntityName& lhs, const EntityName& rhs) -> bool { + // This requires that there are no padding bits in the type. This is upheld + // since it holds values all of the same size: each is 32 bits, with one + // split into 31 and 1 bits. return std::memcmp(&lhs, &rhs, sizeof(EntityName)) == 0; }