[clang] [Clang] Fix `-Wsign-compare` assertion when negating a vector of unsigned integers (PR #223295)
Akash Manna via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 20:59:23 PDT 2026
akash-manna-sky wrote:
> I saw you mentioned `matrix_type` in the summary, are they affected by this change, if so that should be tested.
No, matrix types aren't affected. Sema rejects unary `-` and `~` on a matrix operand (`invalid argument type ... to unary expression`), so `TryGetExprRange` never sees a matrix-typed `UnaryOperator`. I only mentioned matrices because `hasUnsignedIntegerRepresentation()` happens to look through them as well as vectors; sorry for the confusion. @shafik
https://github.com/llvm/llvm-project/pull/223295
More information about the cfe-commits
mailing list