================
@@ -538,9 +553,12 @@ SVal SimpleSValBuilder::evalBinOpNN(ProgramStateRef state,
           CompareType.apply(LHSValue);
           CompareType.apply(RHSValue);
         } else if (!BinaryOperator::isShiftOp(op)) {
-          APSIntType IntType = BasicVals.getAPSIntType(resultTy);
-          IntType.apply(LHSValue);
-          IntType.apply(RHSValue);
+          // Check if resultTy is valid before using it
+          if (!resultTy.isNull()) {
----------------
steakhal wrote:

Checking the `resultTy` here and there without systematic guarantees doesn't 
seem like the right approach.
We should think about making this bulletproof somehow.

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

Reply via email to