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

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 22 23:35:26 PDT 2025


https://github.com/mizvekov commented:

How about inner qualifiers? The patch doesn't address the situation.

For a test like:
```C++
using ConstInt = const int;
using WrapConstInt1 = ConstInt __attribute__((overflow_behavior(wrap)));
using WrapConstInt2 = const int __attribute__((overflow_behavior(wrap)));
```
WrapConstInt1 and WrapConstInt2 should be the same type, as this is what makes most sense, I think.

This would be the same rules as qualifiers on array types, the inner and outer qualifiers mean the same thing and are added together for canonicalization.

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


More information about the cfe-commits mailing list