[cfe-commits] r163394 - /cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
Anna Zaks
ganna at apple.com
Fri Sep 7 09:22:09 PDT 2012
Author: zaks
Date: Fri Sep 7 11:22:09 2012
New Revision: 163394
URL: http://llvm.org/viewvc/llvm-project?rev=163394&view=rev
Log:
[analyzer] Explain why we need condition 8.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp?rev=163394&r1=163393&r2=163394&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp Fri Sep 7 11:22:09 2012
@@ -68,7 +68,7 @@
// (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 @@
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;
More information about the cfe-commits
mailing list