diff options
Diffstat (limited to 'lib/Expr')
-rw-r--r-- | lib/Expr/ExprEvaluator.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Expr/ExprEvaluator.cpp b/lib/Expr/ExprEvaluator.cpp index 1a146641..6b84cd6f 100644 --- a/lib/Expr/ExprEvaluator.cpp +++ b/lib/Expr/ExprEvaluator.cpp @@ -97,3 +97,12 @@ ExprVisitor::Action ExprEvaluator::visitURem(const URemExpr &e) { ExprVisitor::Action ExprEvaluator::visitSRem(const SRemExpr &e) { return protectedDivOperation(e); } + +ExprVisitor::Action ExprEvaluator::visitExprPost(const Expr& e) { + // When evaluating an assignment we should fold NotOptimizedExpr + // nodes so we can fully evaluate. + if (e.getKind() == Expr::NotOptimized) { + return Action::changeTo(static_cast<const NotOptimizedExpr&>(e).src); + } + return Action::skipChildren(); +} |