From: Eli Friedman Date: Sat, 12 Dec 2009 03:36:52 +0000 (+0000) Subject: Fix for PR4642: move work in HTMLPrinter out of the destructor. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de2baa7576f6638c31168960557d30eac1766eb9;p=clang Fix for PR4642: move work in HTMLPrinter out of the destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91205 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/HTMLPrint.cpp b/lib/Frontend/HTMLPrint.cpp index 75e6184572..9ea8cb3fee 100644 --- a/lib/Frontend/HTMLPrint.cpp +++ b/lib/Frontend/HTMLPrint.cpp @@ -41,9 +41,9 @@ namespace { bool _SyntaxHighlight, bool _HighlightMacros) : Out(OS), PP(pp), SyntaxHighlight(_SyntaxHighlight), HighlightMacros(_HighlightMacros) {} - virtual ~HTMLPrinter(); void Initialize(ASTContext &context); + void HandleTranslationUnit(ASTContext &Ctx); }; } @@ -58,7 +58,7 @@ void HTMLPrinter::Initialize(ASTContext &context) { R.setSourceMgr(context.getSourceManager(), context.getLangOptions()); } -HTMLPrinter::~HTMLPrinter() { +void HTMLPrinter::HandleTranslationUnit(ASTContext &Ctx) { if (PP.getDiagnostics().hasErrorOccurred()) return;