|
@@ -726,9 +726,11 @@ SVal SimpleSValBuilder::evalBinOpLL(ProgramStateRef state,
|
|
|
if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) {
|
|
|
// If one of the operands is a symbol and the other is a constant,
|
|
|
// build an expression for use by the constraint manager.
|
|
|
- if (SymbolRef lSym = lhs.getAsLocSymbol(true))
|
|
|
- return MakeSymIntVal(lSym, op, rInt->getValue(), resultTy);
|
|
|
-
|
|
|
+ if (SymbolRef lSym = lhs.getAsLocSymbol(true)) {
|
|
|
+ if (BinaryOperator::isComparisonOp(op))
|
|
|
+ return MakeSymIntVal(lSym, op, rInt->getValue(), resultTy);
|
|
|
+ return UnknownVal();
|
|
|
+ }
|
|
|
// Special case comparisons to NULL.
|
|
|
// This must come after the test if the LHS is a symbol, which is used to
|
|
|
// build constraints. The address of any non-symbolic region is guaranteed
|