From 4ea9004fe8a555849f12f67600f4d5d09016d1db Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 15 Feb 2011 02:20:03 +0000 Subject: [PATCH] IdempotentOperationChecker: don't repeatedly recompute block reachability. llvm-svn: 125548 --- .../StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp index 8f47f9eb4fed..2b0753649e31 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;