]> granicus.if.org Git - clang/commitdiff
IdempotentOperationChecker: don't repeatedly recompute block reachability.
authorTed Kremenek <kremenek@apple.com>
Tue, 15 Feb 2011 02:20:03 +0000 (02:20 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 15 Feb 2011 02:20:03 +0000 (02:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125548 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp

index 8f47f9eb4fed48328da9fd877ba3548c87bbe5d4..2b0753649e31ce28d1c173f448dc750f60d5856b 100644 (file)
@@ -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;