================
@@ -275,6 +275,9 @@ BasicValueFactory::evalAPSInt(BinaryOperator::Opcode Op,
       if (V2.isSigned() && V2.isNegative())
         return nullptr;
 
+      if (V2.getBitWidth() > 64)
----------------
DonatNagyE wrote:

```suggestion
      if (V2.isNegative() || V2.getBitWidth() > 64)
```
You can combine the new condition with the previous early return branch. Note 
that the signedness check was completely superfluous, because 
`APSInt::isNegative()` is defined as `isSigned() && APInt::isNegative()` [where 
`APInt::isNegative()` checks the sign bit].

https://github.com/llvm/llvm-project/pull/67212
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to