Unverified Commit 889dfd4a authored by Guillaume Chatelet's avatar Guillaume Chatelet Committed by GitHub
Browse files

[libc][msan] Fix "non-constexpr function '__msan_unpoison' cannot be used in a...

[libc][msan] Fix "non-constexpr function '__msan_unpoison' cannot be used in a constant expression" (#88719)

Prior to this patch, calling `cpp::bit_cast<T>` in `constexpr`
expressions under `-fsanitize=memory` would fail with the following
message "non-constexpr function '__msan_unpoison' cannot be used in a
constant expression".

This patch makes sure that the `__msan_unpoison` expression is guarded
by `!__builtin_is_constant_evaluated()`.
parent 9f3334e9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment