Unverified Commit b6628c24 authored by Sirraide's avatar Sirraide Committed by GitHub
Browse files

[Clang] Fix crash on invalid size in user-defined `static_assert` message (#89420)

This addresses two problems observed in #89407 wrt user-defined
`static_assert` messages:

1. In `Expr::EvaluateCharRangeAsString`, we were calling `getExtValue()`
instead of `getZExtValue()`, which would assert if a negative or very
large number was returned from `size()`.
2. If the value could not be converted to `std::size_t`, attempting to
diagnose that would crash because `ext_cce_narrowing` was missing two
`%select` cases.

This fixes #89407.
parent c4c54af5
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