diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-02-14 21:26:59 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-02-14 21:26:59 +0000 |
commit | b5d87d88438717e09aaa3bba955fdd297e91b531 (patch) | |
tree | 0904a302e3ea683657a17e5785a0d5f08157ddda /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | |
parent | 621003e7b956906f25b4d9e7c55fa051a54e0f0b (diff) | |
download | bcm5719-llvm-b5d87d88438717e09aaa3bba955fdd297e91b531.tar.gz bcm5719-llvm-b5d87d88438717e09aaa3bba955fdd297e91b531.zip |
Further remove some recursive visitiation in ExprEngine that is no longer needed because the CFG is fully linearized.
llvm-svn: 150504
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 36ee17522b4..3d5e1edc5f2 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -569,25 +569,19 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U, break; case UO_Real: { const Expr *Ex = U->getSubExpr()->IgnoreParens(); - ExplodedNodeSet Tmp; - Visit(Ex, Pred, Tmp); - - for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) { - // FIXME: We don't have complex SValues yet. - if (Ex->getType()->isAnyComplexType()) { - // Just report "Unknown." - continue; - } + // FIXME: We don't have complex SValues yet. + if (Ex->getType()->isAnyComplexType()) { + // Just report "Unknown." + break; + } - // For all other types, UO_Real is an identity operation. - assert (U->getType() == Ex->getType()); - ProgramStateRef state = (*I)->getState(); - const LocationContext *LCtx = (*I)->getLocationContext(); - Bldr.generateNode(U, *I, state->BindExpr(U, LCtx, + // For all other types, UO_Real is an identity operation. + assert (U->getType() == Ex->getType()); + ProgramStateRef state = Pred->getState(); + const LocationContext *LCtx = Pred->getLocationContext(); + Bldr.generateNode(U, Pred, state->BindExpr(U, LCtx, state->getSVal(Ex, LCtx))); - } - break; } |