From: Ted Kremenek Date: Sun, 2 Aug 2009 05:43:14 +0000 (+0000) Subject: Fix regression caused by recent refactoring where HTML and plist files would not... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=690a7f431d6863a101711e67636d51ddd13f35c5;p=clang Fix regression caused by recent refactoring where HTML and plist files would not get flushed out when using '-disable-free'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp index ed7ea5e8e7..44d79be11c 100644 --- a/lib/Frontend/AnalysisConsumer.cpp +++ b/lib/Frontend/AnalysisConsumer.cpp @@ -234,6 +234,11 @@ void AnalysisConsumer::HandleTranslationUnit(ASTContext &C) { if (ObjCImplementationDecl* ID = dyn_cast(*I)) HandleCode(ID, 0, ObjCImplementationActions); } + + // Explicitly destroy the PathDiagnosticClient. This will flush its output. + // FIXME: This should be replaced with something that doesn't rely on + // side-effects in PathDiagnosticClient's destructor. + PD.reset(NULL); } void AnalysisConsumer::HandleCode(Decl* D, Stmt* Body, Actions& actions) {