diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h | 4 | ||||
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index cc315938333..69ec3e3b3fc 100644 --- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -72,7 +72,9 @@ public: struct FilesMade : public llvm::FoldingSet<PDFileEntry> { llvm::BumpPtrAllocator Alloc; - + + ~FilesMade(); + void addDiagnostic(const PathDiagnostic &PD, StringRef ConsumerName, StringRef fileName); 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) { |

