diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-08 09:30:02 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-08 09:30:02 +0000 |
commit | 6f8c430a95279ef048a356d6283871477b4ad351 (patch) | |
tree | c5af9162586f17610d741fc0a5fcdc4ab404e2dc /lib/Checker/MallocChecker.cpp | |
parent | b241cf6f69aeed9f80ec528bc9cb5c9894e6684a (diff) |
Rename: GRState::getSVal(Stmt*) => getExprVal(),
GRState::getSVal(MemRegion*) => Load().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/MallocChecker.cpp')
-rw-r--r-- | lib/Checker/MallocChecker.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Checker/MallocChecker.cpp b/lib/Checker/MallocChecker.cpp index 3be2e0299b..7f36f74578 100644 --- a/lib/Checker/MallocChecker.cpp +++ b/lib/Checker/MallocChecker.cpp @@ -103,7 +103,7 @@ void *MallocChecker::getTag() { bool MallocChecker::EvalCallExpr(CheckerContext &C, const CallExpr *CE) { const GRState *state = C.getState(); const Expr *Callee = CE->getCallee(); - SVal L = state->getSVal(Callee); + SVal L = state->getExprVal(Callee); const FunctionDecl *FD = L.getAsFunctionDecl(); if (!FD) @@ -149,7 +149,7 @@ const GRState *MallocChecker::MallocMemAux(CheckerContext &C, SVal RetVal = ValMgr.getConjuredSymbolVal(NULL, CE, CE->getType(), Count); - SVal Size = state->getSVal(SizeEx); + SVal Size = state->getExprVal(SizeEx); state = C.getEngine().getStoreManager().setExtent(state, RetVal.getAsRegion(), Size); @@ -171,7 +171,7 @@ void MallocChecker::FreeMem(CheckerContext &C, const CallExpr *CE) { const GRState *MallocChecker::FreeMemAux(CheckerContext &C, const CallExpr *CE, const GRState *state) { - SVal ArgVal = state->getSVal(CE->getArg(0)); + SVal ArgVal = state->getExprVal(CE->getArg(0)); SymbolRef Sym = ArgVal.getAsLocSymbol(); assert(Sym); @@ -205,7 +205,8 @@ const GRState *MallocChecker::FreeMemAux(CheckerContext &C, const CallExpr *CE, void MallocChecker::ReallocMem(CheckerContext &C, const CallExpr *CE) { const GRState *state = C.getState(); const Expr *Arg0 = CE->getArg(0); - DefinedOrUnknownSVal Arg0Val=cast<DefinedOrUnknownSVal>(state->getSVal(Arg0)); + DefinedOrUnknownSVal Arg0Val = + cast<DefinedOrUnknownSVal>(state->getExprVal(Arg0)); ValueManager &ValMgr = C.getValueManager(); SValuator &SVator = C.getSValuator(); @@ -229,7 +230,7 @@ void MallocChecker::ReallocMem(CheckerContext &C, const CallExpr *CE) { if (const GRState *stateNotEqual = state->Assume(PtrEQ, false)) { const Expr *Arg1 = CE->getArg(1); DefinedOrUnknownSVal Arg1Val = - cast<DefinedOrUnknownSVal>(stateNotEqual->getSVal(Arg1)); + cast<DefinedOrUnknownSVal>(stateNotEqual->getExprVal(Arg1)); DefinedOrUnknownSVal SizeZero = SVator.EvalEQ(stateNotEqual, Arg1Val, ValMgr.makeIntValWithPtrWidth(0, false)); @@ -304,7 +305,7 @@ void MallocChecker::PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S) { const GRState *state = C.getState(); - SymbolRef Sym = state->getSVal(RetE).getAsSymbol(); + SymbolRef Sym = state->getExprVal(RetE).getAsSymbol(); if (!Sym) return; |