Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WithHelperKey
breaks on clang with asserts on (#26500)
`WithHelperKey` breaks on clang with asserts `WithHelperKey` is a template class that has an inline field that it uses to produce a memory address that is used as a data key. This PR is not concerned with the underlying causes for this unconventional design. Rather, this change aims to fix a clang crash that happens whenever nearly daily when building brave with a clang binary that has asserts on. In particular, it looks like some combination of the key address and the use `std::addressof` cause clang to assert and crash. This change works around this crash by returning the address of the inline variable using `&`. For a repro of the crash, see: https://godbolt.org/z/M6oq6b3sz An issue has been created for this issue as well llvm/llvm-project#111188
- Loading branch information