[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 30 16:59:31 PDT 2025
rjmccall wrote:
Thanks. So IIUC, the rule is:
1. If the type of either operand of an arithmetic operator is `__ob_trap`, the operator traps on overflow, and the result type is `__ob_trap`.
2. If either the operand type or the destination type of an integer conversion is `__ob_trap`, the conversion traps on overflow.
If that's right, that seems pretty reasonable. I still favor a scope-based approach, but this is a substantially improved type-based approach from how it was before.
https://github.com/llvm/llvm-project/pull/148914
More information about the cfe-commits
mailing list