diff options
| author | Ted Kremenek <kremenek@apple.com> | 2012-01-25 22:18:04 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2012-01-25 22:18:04 +0000 |
| commit | 807f7e38a94e19371f0cd6966a0e5590184287ee (patch) | |
| tree | 37de24f74d52efa85ea55afea587f9ce9ca3cd32 /clang/lib/StaticAnalyzer | |
| parent | 1b78b3d1b1e3a1508724284d4e796244a9869b48 (diff) | |
| download | bcm5719-llvm-807f7e38a94e19371f0cd6966a0e5590184287ee.tar.gz bcm5719-llvm-807f7e38a94e19371f0cd6966a0e5590184287ee.zip | |
Post open source analyzer build checker-259.
llvm-svn: 148988
Diffstat (limited to 'clang/lib/StaticAnalyzer')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index b27595a41b6..c4c1d659a8e 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -138,17 +138,20 @@ PathDiagnosticPiece *FindLastStoreBRVisitor::VisitNode(const ExplodedNode *N, if (!StoreSite) { const ExplodedNode *Node = N, *Last = NULL; - for ( ; Node ; Last = Node, Node = Node->getFirstPred()) { + for ( ; Node ; Node = Node->getFirstPred()) { if (const VarRegion *VR = dyn_cast<VarRegion>(R)) { if (const PostStmt *P = Node->getLocationAs<PostStmt>()) if (const DeclStmt *DS = P->getStmtAs<DeclStmt>()) if (DS->getSingleDecl() == VR->getDecl()) { + // Record the last seen initialization point. Last = Node; break; } } + // Does the region still bind to value V? If not, we are done + // looking for store sites. if (Node->getState()->getSVal(R) != V) break; } |

