summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-05-03 10:39:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-05-03 10:39:05 +0000
commit7ff07727b540dfb17b5a41c95306c91e1e04ce2c (patch)
tree8ed2259b1f840445b87e3763f6cb26d3872a13d8 /clang/lib/StaticAnalyzer
parentddd0cb5ecf224cc9d5b1b502d7ca42d8d735c0c0 (diff)
downloadbcm5719-llvm-7ff07727b540dfb17b5a41c95306c91e1e04ce2c.tar.gz
bcm5719-llvm-7ff07727b540dfb17b5a41c95306c91e1e04ce2c.zip
[leaks] The PDFileEntry nodes in the FilesMade FoldingSet contain
a std::vector that allocates on the heap. As a consequence, we have to run all of their destructors when tearing down the set, not just deallocate the memory blobs. llvm-svn: 207902
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r--clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
index 89e43091753..5b2aa353651 100644
--- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
+++ b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
@@ -451,6 +451,11 @@ void PathDiagnosticConsumer::FlushDiagnostics(
Diags.clear();
}
+PathDiagnosticConsumer::FilesMade::~FilesMade() {
+ for (PDFileEntry &Entry : *this)
+ Entry.~PDFileEntry();
+}
+
void PathDiagnosticConsumer::FilesMade::addDiagnostic(const PathDiagnostic &PD,
StringRef ConsumerName,
StringRef FileName) {
OpenPOWER on IntegriCloud