aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRCoreEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-06-20 21:45:25 +0000
committerTed Kremenek <kremenek@apple.com>2008-06-20 21:45:25 +0000
commit1a654b60ef40e84f3943cdb581795c4d4dae1e45 (patch)
tree818d13bf262119a807f9598a533c502da72caede /lib/Analysis/GRCoreEngine.cpp
parentf8e32cf062f39fff1a00aff748cb6b5dc0abc2fe (diff)
Modified the dead stores checker to...
1) Check if a dead store appears as a subexpression. For such cases, we emit a verbose diagnostic so that users aren't confused. This addresses: <rdar://problem/5968508> checker gives misleading report for dead store in loop 2) Don't emit a dead store warning when assigning a null value to a pointer. This is a common form of defensive programming. We may wish to make this an option to the the checker one day. This addresses the feature request in the following email: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRCoreEngine.cpp')
-rw-r--r--lib/Analysis/GRCoreEngine.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp
index 7c2ca0c13f..a4bb7fa631 100644
--- a/lib/Analysis/GRCoreEngine.cpp
+++ b/lib/Analysis/GRCoreEngine.cpp
@@ -253,19 +253,6 @@ void GRCoreEngineImpl::HandlePostStmt(const PostStmt& L, CFGBlock* B,
}
}
-typedef llvm::DenseMap<Stmt*,Stmt*> ParentMapTy;
-/// PopulateParentMap - Recurse the AST starting at 'Parent' and add the
-/// mappings between child and parent to ParentMap.
-static void PopulateParentMap(Stmt* Parent, ParentMapTy& M) {
- for (Stmt::child_iterator I=Parent->child_begin(),
- E=Parent->child_end(); I!=E; ++I) {
-
- assert (M.find(*I) == M.end());
- M[*I] = Parent;
- PopulateParentMap(*I, M);
- }
-}
-
/// GenerateNode - Utility method to generate nodes, hook up successors,
/// and add nodes to the worklist.
void GRCoreEngineImpl::GenerateNode(const ProgramPoint& Loc, void* State,