================
@@ -9744,6 +9744,16 @@ static void DiagnoseNarrowingInInitList(Sema &S,
 
   case NK_Constant_Narrowing: {
     // A constant value was narrowed.
+
+    // Overflow behavior destination types with a 'wrap' kind can elide
----------------
JustinStitt wrote:

Without the OBT check in the diagnostic logic we get the following warning:

```c
constexpr short __ob_wrap cx2 = {100000}; // constant expression evaluates to 
100000 which cannot be narrowed to type '__ob_wrap short'
```

And I didn't want this to be the case for wrapping things. So it is just a 
design decisions really. It is consistent with the 
`-fsanitize=implicit-unsigned-integer-truncation` handling too. I just really 
want free reign over bit boundary stuff with `__ob_wrap` types.

It should be noted the OBT check only cares about the destination type.

https://github.com/llvm/llvm-project/pull/148914
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to