[clang] [analyzer] Clean up slightly the messed up ownership model of the analyzer (PR #128368)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 02:33:38 PST 2025


================
@@ -50,14 +46,11 @@ AnalysisManager::AnalysisManager(ASTContext &ASTCtx, Preprocessor &PP,
 
 AnalysisManager::~AnalysisManager() {
   FlushDiagnostics();
-  for (PathDiagnosticConsumer *Consumer : PathConsumers) {
-    delete Consumer;
-  }
 }
----------------
steakhal wrote:

```suggestion
AnalysisManager::~AnalysisManager() { FlushDiagnostics(); }
```

https://github.com/llvm/llvm-project/pull/128368


More information about the cfe-commits mailing list