[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

Justin Stitt via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 4 09:35:02 PST 2025


JustinStitt wrote:

Summarizing the round table w/ @ojhunt @rjmccall @mizvekov @efriedma-quic (and others) it seems the current design ([summarized by John in the rfc](https://discourse.llvm.org/t/rfc-v2-clang-introduce-overflowbehaviortypes-for-wrapping-and-non-wrapping-arithmetic/86507/46?u=justinstitt)) is on the right track.

The main talking point from the OBT discussion was about implicitly casting operands to functions whose parameter is OBT.

Consider the following example:
```c
void foo(__ob_trap int);

void bar(s64 a) {
  foo(a);
}
```

In such an example, I believe @ojhunt and @rjmccall argued that we shouldn't trap when `a` is implicitly cast down to a `__ob_trap int`. For the follks who were there, am I summarizing this properly? Is there anything y'all want to add? Much of the complex C++ discussion went over my head so I will not attempt to describe the semantics there. Please help :)

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


More information about the lldb-commits mailing list