diff options
author | Zhanyong Wan <wan@google.com> | 2010-11-24 01:47:11 +0000 |
---|---|---|
committer | Zhanyong Wan <wan@google.com> | 2010-11-24 01:47:11 +0000 |
commit | cca8ab155e8c20b98ba2d90eb2b1c228895e06fd (patch) | |
tree | aeaeb63d7d45e0c870bf65fd0d4b100c611ab260 | |
parent | 3baf672378f105602d2b12f03f00277ae1936fe9 (diff) |
Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120073 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index 4483cdb76c..30ac9cefbb 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -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 |