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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits