aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-02-14 21:26:59 +0000
committerTed Kremenek <kremenek@apple.com>2012-02-14 21:26:59 +0000
commit019316636b0a2d2273b945a98e52d454acee66ef (patch)
tree7baed669f5485108dff27621f79c3cac2a5c6fa3 /lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent53393f23d8b767f976427a6d45b310bf37dd91c4 (diff)
Further remove some recursive visitiation in ExprEngine that is no longer needed because the CFG is fully linearized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineC.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 36ee17522b..3d5e1edc5f 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/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;
}