[cfe-commits] r169530 - /cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
Jordan Rose
jordan_rose at apple.com
Thu Dec 6 10:58:29 PST 2012
Author: jrose
Date: Thu Dec 6 12:58:29 2012
New Revision: 169530
URL: http://llvm.org/viewvc/llvm-project?rev=169530&view=rev
Log:
[analyzer] Remove isa<> followed by dyn_cast<>.
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=169530&r1=169529&r2=169530&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp Thu Dec 6 12:58:29 2012
@@ -104,14 +104,13 @@
// 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()))
+ const Expr *Ex = dyn_cast<Expr>(ps.getStmt());
+ if (!Ex)
+ return false;
+
+ ParentMap &PM = progPoint.getLocationContext()->getParentMap();
+ if (!PM.isConsumedExpr(Ex))
return false;
-
- if (const Expr *Ex = dyn_cast<Expr>(ps.getStmt())) {
- ParentMap &PM = progPoint.getLocationContext()->getParentMap();
- if (!PM.isConsumedExpr(Ex))
- return false;
- }
// Condition 9.
const ProgramPoint SuccLoc = succ->getLocation();
More information about the cfe-commits
mailing list