diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-12-06 18:58:29 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-12-06 18:58:29 +0000 |
commit | b10aae3feca8ed68e7210f496914b4a69f105095 (patch) | |
tree | 83792c7d74df55d5374f7d1ce719a42e780d92b5 /clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | |
parent | 642e063838cc1c4c3e952a51d5548a77dcce9e17 (diff) | |
download | bcm5719-llvm-b10aae3feca8ed68e7210f496914b4a69f105095.tar.gz bcm5719-llvm-b10aae3feca8ed68e7210f496914b4a69f105095.zip |
[analyzer] Remove isa<> followed by dyn_cast<>.
llvm-svn: 169530
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index 3c5380c54d2..d64078f750d 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -104,14 +104,13 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { // 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(); |