Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.

llvm-svn: 120073
This commit is contained in:
Zhanyong Wan 2010-11-24 01:47:11 +00:00
parent cf3475172f
commit 8e82c6372a
1 changed files with 2 additions and 1 deletions

View File

@ -1957,10 +1957,11 @@ void GRExprEngine::EvalStore(ExplodedNodeSet& Dst, const Expr *AssignE,
EvalBind(Dst, StoreE, *NI, GetState(*NI), location, Val);
}
void GRExprEngine::EvalLoad(ExplodedNodeSet& Dst, const Expr *Ex,
void GRExprEngine::EvalLoad(ExplodedNodeSet& Dst, const Expr *Ex,
ExplodedNode* Pred,
const GRState* state, SVal location,
const void *tag, QualType LoadTy) {
assert(!isa<NonLoc>(location) && "location cannot be a NonLoc.");
// Are we loading from a region? This actually results in two loads; one
// to fetch the address of the referenced value and one to fetch the