From 811db4eac4e036de3705570a46e28bf7d993dbab Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 23 Oct 2012 22:26:28 +0000 Subject: Make DiagnosticOptions intrusively reference-counted, and make sure the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508 --- clang/lib/Rewrite/Core/HTMLRewrite.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Rewrite/Core') diff --git a/clang/lib/Rewrite/Core/HTMLRewrite.cpp b/clang/lib/Rewrite/Core/HTMLRewrite.cpp index 3deb90e632d..0e8e4fec9f4 100644 --- a/clang/lib/Rewrite/Core/HTMLRewrite.cpp +++ b/clang/lib/Rewrite/Core/HTMLRewrite.cpp @@ -484,6 +484,7 @@ void html::HighlightMacros(Rewriter &R, FileID FID, const Preprocessor& PP) { // Temporarily change the diagnostics object so that we ignore any generated // diagnostics from this pass. DiagnosticsEngine TmpDiags(PP.getDiagnostics().getDiagnosticIDs(), + &PP.getDiagnostics().getDiagnosticOptions(), new IgnoringDiagConsumer); // FIXME: This is a huge hack; we reuse the input preprocessor because we want -- cgit v1.2.3