diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-24 08:42:04 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-24 08:42:04 +0000 |
commit | 9c0d6891b3ec4b0d20b8a295946c0dc5426d147c (patch) | |
tree | 38ff32c0d737ca1f2d50d21c69a7c3e0ae8c6c2a /lib/StaticAnalyzer/Checkers/ExprEngine.cpp | |
parent | 69355798abdbe5e78d1185af7d4600b9355b5814 (diff) |
[analyzer] Don't pass a GRState to CheckerManager::runCheckersForLocation, terrible mistake.
If the state is new, make sure an ExplodedNode is associated with it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp index 7d020dacae..c1b1e65698 100644 --- a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp @@ -1955,14 +1955,21 @@ void ExprEngine::evalLocation(ExplodedNodeSet &Dst, const Stmt *S, return; } - ExplodedNodeSet Src; - Src.Add(Pred); if (Checkers.empty()) { + ExplodedNodeSet Src; + if (Builder->GetState(Pred) == state) { + Src.Add(Pred); + } else { + // Associate this new state with an ExplodedNode. + Src.Add(Builder->generateNode(S, state, Pred)); + } getCheckerManager().runCheckersForLocation(Dst, Src, location, isLoad, S, - state, *this); + *this); return; } + ExplodedNodeSet Src; + Src.Add(Pred); ExplodedNodeSet CheckersV1Dst; ExplodedNodeSet Tmp; ExplodedNodeSet *PrevSet = &Src; @@ -1994,7 +2001,7 @@ void ExprEngine::evalLocation(ExplodedNodeSet &Dst, const Stmt *S, } getCheckerManager().runCheckersForLocation(Dst, CheckersV1Dst, location, - isLoad, S, state, *this); + isLoad, S, *this); } bool ExprEngine::InlineCall(ExplodedNodeSet &Dst, const CallExpr *CE, |