Skip to content

New __ptrauth types are wrongly reported as __is_trivially_equality_comparable #137473

@halbi2

Description

@halbi2
struct S1 {
  int * __ptrauth(1,1,50) p_;
  bool operator==(const S1&) const = default;
};
static_assert(!__is_trivially_equality_comparable(S1));

This test case fails. So libc++ std::equal will use memcmp to compare objects of type S1 and will wrongly report that they are not-equal when they are supposed to be equal. This is a wrong-codegen bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions