diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-07-18 15:54:51 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-07-18 15:54:51 +0000 |
commit | b1c91bfc45f46c1e01f8cbeca807da4bd08e0940 (patch) | |
tree | 73c8c4156e888d8202ac3b09d007c1af67a52f95 /clang/lib/Analysis/GRSimpleVals.cpp | |
parent | 6a62d908c343df47b272948c9ce96d1df5e3b551 (diff) | |
download | bcm5719-llvm-b1c91bfc45f46c1e01f8cbeca807da4bd08e0940.tar.gz bcm5719-llvm-b1c91bfc45f46c1e01f8cbeca807da4bd08e0940.zip |
Fix regression by explicitly checking if we are negating a SymIntConstantVal.
llvm-svn: 53753
Diffstat (limited to 'clang/lib/Analysis/GRSimpleVals.cpp')
-rw-r--r-- | clang/lib/Analysis/GRSimpleVals.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Analysis/GRSimpleVals.cpp b/clang/lib/Analysis/GRSimpleVals.cpp index 6cb714a86e1..36e7233f25f 100644 --- a/clang/lib/Analysis/GRSimpleVals.cpp +++ b/clang/lib/Analysis/GRSimpleVals.cpp @@ -472,11 +472,16 @@ RVal GRSimpleVals::DetermEvalBinOpNN(ValueStateManager& StateMgr, 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(); |