diff options
author | Anna Zaks <ganna@apple.com> | 2013-03-27 17:36:01 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-03-27 17:36:01 +0000 |
commit | 3655119ab1cb7b26926afeeb0f96cb21a21e410a (patch) | |
tree | 5a64df1425ecaa0e2bbceb34cdad99c812157747 /lib/StaticAnalyzer/Core/ExplodedGraph.cpp | |
parent | 4a49df3be929d442535d6721ab8a2bbc8a7cd528 (diff) |
[analyzer] Cleanup: only get the PostStmt when we need the underlying Stmt + comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index ca466d8907..af9518acc7 100644 --- a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -117,8 +117,7 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { return false; // Condition 4. - PostStmt ps = progPoint.castAs<PostStmt>(); - if (ps.getTag()) + if (progPoint.getTag()) return false; // Conditions 5, 6, and 7. @@ -128,8 +127,9 @@ bool ExplodedGraph::shouldCollect(const ExplodedNode *node) { progPoint.getLocationContext() != pred->getLocationContext()) return false; - // All further checks require expressions. - const Expr *Ex = dyn_cast<Expr>(ps.getStmt()); + // All further checks require expressions. As per #3, we know that we have + // a PostStmt. + const Expr *Ex = dyn_cast<Expr>(progPoint.castAs<PostStmt>().getStmt()); if (!Ex) return false; |