diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 00:50:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 00:50:52 +0000 |
commit | 7b553f1b19221fceb3d90a1a010e0f59e14c2fa7 (patch) | |
tree | d4240f4fd95affd414546ca87a9294ecf9d92a43 /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | |
parent | 9b9c970148907f24d1ead713ad258f864c28f93c (diff) | |
download | bcm5719-llvm-7b553f1b19221fceb3d90a1a010e0f59e14c2fa7.tar.gz bcm5719-llvm-7b553f1b19221fceb3d90a1a010e0f59e14c2fa7.zip |
Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.
llvm-svn: 143263
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 1769ba35b3e..bf97b8bbadd 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -489,7 +489,7 @@ VisitOffsetOfExpr(const OffsetOfExpr *OOE, ExplodedNode *Pred, ExplodedNodeSet &Dst) { StmtNodeBuilder B(Pred, Dst, *currentBuilderContext); Expr::EvalResult Res; - if (OOE->Evaluate(Res, getContext()) && Res.Val.isInt()) { + if (OOE->EvaluateAsRValue(Res, getContext()) && Res.Val.isInt()) { const APSInt &IV = Res.Val.getInt(); assert(IV.getBitWidth() == getContext().getTypeSize(OOE->getType())); assert(OOE->getType()->isIntegerType()); @@ -526,7 +526,7 @@ VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Ex, } Expr::EvalResult Result; - Ex->Evaluate(Result, getContext()); + Ex->EvaluateAsRValue(Result, getContext()); CharUnits amt = CharUnits::fromQuantity(Result.Val.getInt().getZExtValue()); const ProgramState *state = Pred->getState(); |