Fix regression by explicitly checking if we are negating a SymIntConstantVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53753 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp
index 6cb714a..36e7233 100644
--- a/lib/Analysis/GRSimpleVals.cpp
+++ b/lib/Analysis/GRSimpleVals.cpp
@@ -472,11 +472,16 @@
return UnknownVal();
case nonlval::SymIntConstraintValKind: {
+
+ // Logical not?
+ if (!(Op == BinaryOperator::EQ && R.isZeroConstant()))
+ return UnknownVal();
+
const SymIntConstraint& C =
cast<nonlval::SymIntConstraintVal>(L).getConstraint();
BinaryOperator::Opcode Opc = C.getOpcode();
-
+
if (Opc < BinaryOperator::LT || Opc > BinaryOperator::NE)
return UnknownVal();