diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-18 23:03:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-18 23:03:13 +0000 |
commit | 2e3741760f64257bfe3c2efb04ec850acc7bdfe1 (patch) | |
tree | 299f7903f7504366f9811645ab429ba2af8a428a /lib/Rewrite/HTMLRewrite.cpp | |
parent | bdbb004f38978da0c4a75af3294d1c7b5ff84af1 (diff) |
Fix crasher with IgnoringDiagClient
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/HTMLRewrite.cpp')
-rw-r--r-- | lib/Rewrite/HTMLRewrite.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index 5fe064990e..b461df462e 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/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 |