]> granicus.if.org Git - clang/commitdiff
Fix crasher with IgnoringDiagClient
authorDouglas Gregor <dgregor@apple.com>
Wed, 18 Aug 2010 23:03:13 +0000 (23:03 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 18 Aug 2010 23:03:13 +0000 (23:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111447 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Rewrite/HTMLRewrite.cpp

index 5fe064990e9636721e9fc6b33b66cc070c0f4e06..b461df462e2ee36e0a478e28e320ad609a0cccc6 100644 (file)
@@ -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