summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Core
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-23 22:26:28 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-23 22:26:28 +0000
commit811db4eac4e036de3705570a46e28bf7d993dbab (patch)
treea3c03c187e25f995d854d175faaa3d793f12bee1 /clang/lib/Rewrite/Core
parent7fcf0c131bc198de245e65f35b380af02b085dde (diff)
downloadbcm5719-llvm-811db4eac4e036de3705570a46e28bf7d993dbab.tar.gz
bcm5719-llvm-811db4eac4e036de3705570a46e28bf7d993dbab.zip
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
Diffstat (limited to 'clang/lib/Rewrite/Core')
-rw-r--r--clang/lib/Rewrite/Core/HTMLRewrite.cpp1
1 files changed, 1 insertions, 0 deletions
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
OpenPOWER on IntegriCloud