diff options
author | Anna Zaks <ganna@apple.com> | 2012-09-07 16:22:09 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-09-07 16:22:09 +0000 |
commit | 67e0062b7c9e9f81498119708d529983f0872bc7 (patch) | |
tree | b410fe93e4eec29907fb79b89956cdb8dc7fa728 /clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | |
parent | 38c3f9ef2fbb3536d8d17f1c1e1b793385b438da (diff) | |
download | bcm5719-llvm-67e0062b7c9e9f81498119708d529983f0872bc7.tar.gz bcm5719-llvm-67e0062b7c9e9f81498119708d529983f0872bc7.zip |
[analyzer] Explain why we need condition 8.
llvm-svn: 163394
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index ff296403a8c..7e8a02872f9 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -68,7 +68,7 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { // (5) The 'store' is the same as the predecessor. // (6) The 'GDM' is the same as the predecessor. // (7) The LocationContext is the same as the predecessor. - // (8) The PostStmt is for a non-consumed Stmt or Expr. + // (8) The PostStmt isn't for a non-consumed Stmt or Expr. // (9) The successor is not a CallExpr StmtPoint (so that we would be able to // find it when retrying a call with no inlining). // FIXME: It may be safe to reclaim PreCall and PostCall nodes as well. @@ -103,6 +103,9 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { return false; // Condition 8. + // Do not collect nodes for non-consumed Stmt or Expr to ensure precise + // diagnostic generation; specifically, so that we could anchor arrows + // pointing to the beginning of statements (as written in code). if (!isa<Expr>(ps.getStmt())) return false; |