[clang] [clang][Sema] Reject negative tuple sizes (PR #159579)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 18 11:43:06 PDT 2025


tbaederr wrote:

`UnsignedOrNone` just means we assert there when passing `-1`. With a full `std::optional<unsigned>` the value would just underflow and the value we use later would've been wrong. The incorrect handling of negative values has nothing to do with `UnsignedOrNone`.

https://github.com/llvm/llvm-project/pull/159579


More information about the cfe-commits mailing list