aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SValuator.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-06 01:39:48 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-06 01:39:48 +0000
commitcd8f6ac9b613e1fe962ebf9c87d822ce765275e6 (patch)
tree9571f28a057b3d9bc021e9d6af2ab420fe7da2e6 /lib/Analysis/SValuator.cpp
parent2e9f652d53346bf7e64c8a12a9ff06b004a3e489 (diff)
Fix: <rdar://problem/7275774> Static analyzer warns about NULL pointer when
adding assert This fix required a few changes: SimpleSValuator: - Eagerly replace a symbolic value with its constant value in EvalBinOpNN when it is constrained to a constant. This allows us to better constant fold values along a path. - Handle trivial case of '<', '>' comparison of pointers when the two pointers are exactly the same. RegionStoreManager: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SValuator.cpp')
-rw-r--r--lib/Analysis/SValuator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/SValuator.cpp b/lib/Analysis/SValuator.cpp
index 0551c7cdba..86006c3df6 100644
--- a/lib/Analysis/SValuator.cpp
+++ b/lib/Analysis/SValuator.cpp
@@ -43,7 +43,7 @@ SVal SValuator::EvalBinOp(const GRState *ST, BinaryOperator::Opcode Op,
return EvalBinOpLN(ST, Op, cast<Loc>(R), cast<NonLoc>(L), T);
}
- return EvalBinOpNN(Op, cast<NonLoc>(L), cast<NonLoc>(R), T);
+ return EvalBinOpNN(ST, Op, cast<NonLoc>(L), cast<NonLoc>(R), T);
}
DefinedOrUnknownSVal SValuator::EvalEQ(const GRState *ST,