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

Aaron Ballman via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 6 07:06:45 PST 2025


AaronBallman wrote:

> I really don't understand why `_BitInt` and `_Complex` are being brought up here. 

I can explain my reasoning. `xxx int` can be read one of two ways: `xxx` is a type qualifier like `const` (e.g., `const int`) or is a type specifier like `_Complex` (e.g., `_Complex float`). If it's a qualifier, I expect lvalue to rvalue conversion to drop the extra qualifying information, but if it's a type specifier, I expect no change for the type on lvalue to rvalue conversion. To me, `__ob_trap` is far closer to a type specifier than it is a type qualifier; we don't want to drop the information on conversion.

I think it would be confusing for template specializations to notice `__ob_trap` but overloading ignores it. e.g.,
```
template <typename Ty>
struct S {
  static constexpr int value = 0;
};

template <>
struct S<int> {
  static constexpr int value = 1;
};

template <>
struct S<__ob_trap int> { // Ok, not a redefinition
  static constexpr int value = 2;
};

void func(int) {}
void func(__ob_trap int) {} // error: invalid redefinition
```

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


More information about the lldb-commits mailing list