diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-02-15 02:20:03 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-02-15 02:20:03 +0000 |
commit | 4ea9004fe8a555849f12f67600f4d5d09016d1db (patch) | |
tree | 44c508ce2b53cf7f47b9e9f3d5f56ff44398ce2a /clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp | |
parent | 8d53ac81ecd85b43b7e2a29c48a8efe25869115e (diff) | |
download | bcm5719-llvm-4ea9004fe8a555849f12f67600f4d5d09016d1db.tar.gz bcm5719-llvm-4ea9004fe8a555849f12f67600f4d5d09016d1db.zip |
IdempotentOperationChecker: don't repeatedly recompute block reachability.
llvm-svn: 125548
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp index 8f47f9eb4fe..2b0753649e3 100644 --- a/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp @@ -563,8 +563,9 @@ IdempotentOperationChecker::pathWasCompletelyAnalyzed(const CFG *cfg, const CFGBlock *CB, const CFGStmtMap *CBM, const CoreEngine &CE) { - - CRA.reset(new CFGReachabilityAnalysis(*cfg)); + + if (!CRA.get()) + CRA.reset(new CFGReachabilityAnalysis(*cfg)); // Test for reachability from any aborted blocks to this block typedef CoreEngine::BlocksAborted::const_iterator AbortedIterator; |