[clang] [Clang] Fix constexpr inc/dec operators for OverflowBehaviorTypes (PR #183826)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 10:01:47 PST 2026
================
@@ -11,7 +11,7 @@ constexpr wrap_int add(wrap_int a, wrap_int b) {
}
constexpr no_trap_int sub(no_trap_int a, no_trap_int b) {
- return a - b; // expected-note {{-2147483649 is outside the range of representable values}}
+ return a - b; // expected-note {{overflow on type 'no_trap_int' (aka '__ob_trap int') would trap at runtime}}
----------------
JustinStitt wrote:
Tried to handle both yours and @ojhunt's feedback with [`586fd4a`](https://github.com/llvm/llvm-project/pull/183826/commits/586fd4a63c790b8b7c3bacb61e2815b3b54a1766). PTAL.
https://github.com/llvm/llvm-project/pull/183826
More information about the cfe-commits
mailing list