Further remove some recursive visitiation in ExprEngine that is no longer needed because the CFG is fully linearized.

llvm-svn: 150504
This commit is contained in:
Ted Kremenek 2012-02-14 21:26:59 +00:00
parent 621003e7b9
commit b5d87d8843
1 changed files with 11 additions and 17 deletions

View File

@ -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;
}
// 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,
state->getSVal(Ex, LCtx)));
// 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 = Pred->getState();
const LocationContext *LCtx = Pred->getLocationContext();
Bldr.generateNode(U, Pred, state->BindExpr(U, LCtx,
state->getSVal(Ex, LCtx)));
break;
}