[libc++] Add _LIBCPP_NO_SANITIZE for std::__assume_aligned (#220296)
std::assume_aligned takes void* from __builtin_assume_aligned and
converts it _Tp* that causes cfi-unrelated-cast to consider it a
downcast leading to CFI checks. Since std::find_if calls
std::assume_aligned on __last, it will lead to a CFI check that
dereferences __last causing a failure. Based on discussion, we can just
add _LIBCPP_NO_SANITIZE for cfi-unrelated-cast because the check rejects
well-defined behavior.
Fix: https://github.com/llvm/llvm-project/issues/219306
GitOrigin-RevId: 5f3e8f36d69f7758eb3df00cc51a9f047726723e
1 file changed