summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-02-19 23:44:52 +0000
committerReid Kleckner <reid@kleckner.net>2014-02-19 23:44:52 +0000
commit26b55ea31d6aba5ca78fc3f5eb5ce1656630646d (patch)
treef9b51a2ef5a20fffed2a3aded6760390f97b28b8 /lib/StaticAnalyzer/Core/BugReporter.cpp
parentcfbb0138bd919b5b8bb67dc470e1cbe23f8f3dc2 (diff)
downloadclang-26b55ea31d6aba5ca78fc3f5eb5ce1656630646d.tar.gz
clang-26b55ea31d6aba5ca78fc3f5eb5ce1656630646d.tar.bz2
clang-26b55ea31d6aba5ca78fc3f5eb5ce1656630646d.tar.xz
Use llvm::DeleteContainerSeconds when possible
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp
index eedf05685c..f2c2ab1ae2 100644
--- a/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2802,9 +2802,7 @@ void BugReporter::FlushReports() {
// EmitBasicReport.
// FIXME: There are leaks from checkers that assume that the BugTypes they
// create will be destroyed by the BugReporter.
- for (llvm::StringMap<BugType*>::iterator
- I = StrBugTypes.begin(), E = StrBugTypes.end(); I != E; ++I)
- delete I->second;
+ llvm::DeleteContainerSeconds(StrBugTypes);
// Remove all references to the BugType objects.
BugTypes = F.getEmptySet();