From: Ted Kremenek Date: Tue, 15 Feb 2011 02:20:03 +0000 (+0000) Subject: IdempotentOperationChecker: don't repeatedly recompute block reachability. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b53189160c53b1d49d10c1b6fc439549a06ce618;p=clang IdempotentOperationChecker: don't repeatedly recompute block reachability. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125548 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp index 8f47f9eb4f..2b0753649e 100644 --- a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp +++ b/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;