Have IdempotentOperationsChecker pull its CFGStmtMap from AnalysisContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126288 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
index f49b125..0d2ccb9 100644
--- a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
@@ -397,16 +397,13 @@
// If the analyzer did not finish, check to see if we can still emit this
// warning
if (Eng.hasWorkRemaining()) {
- const CFGStmtMap *CBM = CFGStmtMap::Build(AC->getCFG(),
- &AC->getParentMap());
+ const CFGStmtMap *CBM = AC->getCFGStmtMap();
// If we can trace back
if (!pathWasCompletelyAnalyzed(AC->getCFG(),
CBM->getBlock(B), CBM,
Eng.getCoreEngine()))
continue;
-
- delete CBM;
}
// Select the error message and SourceRanges to report.