summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-12-05 18:58:25 +0000
committerAnna Zaks <ganna@apple.com>2011-12-05 18:58:25 +0000
commita636fbe73f1ee04d1b3172ffc2914e08a78ec490 (patch)
treee8d42b749b723166db8117eb3b5289d537bfbb84 /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent51090d5f7f4246c38d746bbb10642f64c51d2329 (diff)
downloadbcm5719-llvm-a636fbe73f1ee04d1b3172ffc2914e08a78ec490.tar.gz
bcm5719-llvm-a636fbe73f1ee04d1b3172ffc2914e08a78ec490.zip
[analyzer] Remove all uses of ConstraintManager::canResonAbout() from
ExprEngine. Teach SimpleConstraintManager::assumeSymRel() to propagate constraints to symbolic expressions. + One extra warning (real bug) is now generated due to enhanced assumeSymRel(). llvm-svn: 145832
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 0f49acca936..12b658eb2d2 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -121,8 +121,7 @@ void ExprEngine::VisitBinaryOperator(const BinaryOperator* B,
SVal LHSVal;
- if (Result.isUnknown() ||
- !getConstraintManager().canReasonAbout(Result)) {
+ if (Result.isUnknown()) {
unsigned Count = currentBuilderContext->getCurrentBlockCount();
@@ -358,8 +357,7 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
// Recover some path-sensitivity if a scalar value evaluated to
// UnknownVal.
- if ((InitVal.isUnknown() ||
- !getConstraintManager().canReasonAbout(InitVal)) &&
+ if ((InitVal.isUnknown()) &&
!VD->getType()->isReferenceType() &&
!Pred->getState()->isTainted(InitVal)) {
InitVal = svalBuilder.getConjuredSymbolVal(NULL, InitEx,
@@ -726,7 +724,7 @@ void ExprEngine::VisitIncrementDecrementOperator(const UnaryOperator* U,
SVal Result = evalBinOp(state, Op, V2, RHS, U->getType());
// Conjure a new symbol if necessary to recover precision.
- if (Result.isUnknown() || !getConstraintManager().canReasonAbout(Result)){
+ if (Result.isUnknown()){
DefinedOrUnknownSVal SymVal =
svalBuilder.getConjuredSymbolVal(NULL, Ex,
currentBuilderContext->getCurrentBlockCount());
OpenPOWER on IntegriCloud