diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-28 01:26:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-28 01:26:35 +0000 |
commit | 312dbec867f6b8d6b86fd562c53352cd4db27468 (patch) | |
tree | 3f99be744eb115066a9d2be4a06a4749abe14f9f /lib/StaticAnalyzer/Checkers/ExprEngine.cpp | |
parent | 3fe71f445f76003649b5da24209e80225a7ee74f (diff) |
[analyzer] Migrate MallocChecker to CheckerV2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp index c1b1e65698..afa97d0d97 100644 --- a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp @@ -267,10 +267,12 @@ void ExprEngine::CheckerVisitBind(const Stmt *StoreE, ExplodedNodeSet &Dst, SVal val, bool isPrevisit) { if (Checkers.empty()) { - Dst.insert(Src); + getCheckerManager().runCheckersForBind(Dst, Src, location, val, StoreE, + *this); return; } + ExplodedNodeSet CheckerV1Tmp; ExplodedNodeSet Tmp; ExplodedNodeSet *PrevSet = &Src; @@ -278,7 +280,7 @@ void ExprEngine::CheckerVisitBind(const Stmt *StoreE, ExplodedNodeSet &Dst, { ExplodedNodeSet *CurrSet = 0; if (I+1 == E) - CurrSet = &Dst; + CurrSet = &CheckerV1Tmp; else { CurrSet = (PrevSet == &Tmp) ? &Src : &Tmp; CurrSet->clear(); @@ -296,6 +298,9 @@ void ExprEngine::CheckerVisitBind(const Stmt *StoreE, ExplodedNodeSet &Dst, PrevSet = CurrSet; } + getCheckerManager().runCheckersForBind(Dst, CheckerV1Tmp, location, val, + StoreE, *this); + // Don't autotransition. The CheckerContext objects should do this // automatically. } @@ -493,6 +498,8 @@ const GRState *ExprEngine::processAssume(const GRState *state, SVal cond, CO_Ref = NewCO.take(); } + state = getCheckerManager().runCheckersForEvalAssume(state, cond, assumption); + // If the state is infeasible at this point, bail out. if (!state) return NULL; |