summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/HTMLRewrite.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-18 23:03:13 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-18 23:03:13 +0000
commitf0708dee83b5055fd738d14b06820f093df09162 (patch)
tree54485affeef24738abd81f26764239170ca3147b /clang/lib/Rewrite/HTMLRewrite.cpp
parent26403acef78374cecdbb1666b7e4d8342d96e5fe (diff)
downloadbcm5719-llvm-f0708dee83b5055fd738d14b06820f093df09162.tar.gz
bcm5719-llvm-f0708dee83b5055fd738d14b06820f093df09162.zip
Fix crasher with IgnoringDiagClient
llvm-svn: 111447
Diffstat (limited to 'clang/lib/Rewrite/HTMLRewrite.cpp')
-rw-r--r--clang/lib/Rewrite/HTMLRewrite.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp
index 5fe064990e9..b461df462e2 100644
--- a/clang/lib/Rewrite/HTMLRewrite.cpp
+++ b/clang/lib/Rewrite/HTMLRewrite.cpp
@@ -486,8 +486,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.
- IgnoringDiagClient TmpDC;
- Diagnostic TmpDiags(&TmpDC);
+ Diagnostic TmpDiags(new IgnoringDiagClient);
// FIXME: This is a huge hack; we reuse the input preprocessor because we want
// its state, but we aren't actually changing it (we hope). This should really
OpenPOWER on IntegriCloud