diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-02-08 16:18:51 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-02-08 16:18:51 +0000 |
commit | 1397663af9dbcc24dbf0e11de43931b3dc08fdbb (patch) | |
tree | 2faba52258a1c9030b653b71072220843482c724 /lib/Checker/MallocChecker.cpp | |
parent | d819f74fb5c2213782a443b432fccec95048ec74 (diff) |
Revert 95541.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95545 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/MallocChecker.cpp')
-rw-r--r-- | lib/Checker/MallocChecker.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Checker/MallocChecker.cpp b/lib/Checker/MallocChecker.cpp index 7f36f74578..3be2e0299b 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->getExprVal(Callee); + SVal L = state->getSVal(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->getExprVal(SizeEx); + SVal Size = state->getSVal(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->getExprVal(CE->getArg(0)); + SVal ArgVal = state->getSVal(CE->getArg(0)); SymbolRef Sym = ArgVal.getAsLocSymbol(); assert(Sym); @@ -205,8 +205,7 @@ 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->getExprVal(Arg0)); + DefinedOrUnknownSVal Arg0Val=cast<DefinedOrUnknownSVal>(state->getSVal(Arg0)); ValueManager &ValMgr = C.getValueManager(); SValuator &SVator = C.getSValuator(); @@ -230,7 +229,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->getExprVal(Arg1)); + cast<DefinedOrUnknownSVal>(stateNotEqual->getSVal(Arg1)); DefinedOrUnknownSVal SizeZero = SVator.EvalEQ(stateNotEqual, Arg1Val, ValMgr.makeIntValWithPtrWidth(0, false)); @@ -305,7 +304,7 @@ void MallocChecker::PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S) { const GRState *state = C.getState(); - SymbolRef Sym = state->getExprVal(RetE).getAsSymbol(); + SymbolRef Sym = state->getSVal(RetE).getAsSymbol(); if (!Sym) return; |