Hook up HTMLDiagnostics to use Chris's new syntax highlighting. --html-diags
currently doesn't pass in the Preprocessor from the driver, so we don't get
syntax highlighting when we create HTMLDiagnostics in that way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49796 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp
index 2b01489..54678de 100644
--- a/Driver/HTMLPrint.cpp
+++ b/Driver/HTMLPrint.cpp
@@ -59,8 +59,10 @@
html::AddLineNumbers(R, FileID);
html::AddHeaderFooterInternalBuiltinCSS(R, FileID);
- // If we have a preprocessor, relex the file and syntax hilight. We might not
- // have a preprocessor if we come from a deserialized AST file, for example.
+ // If we have a preprocessor, relex the file and syntax highlight.
+ // We might not have a preprocessor if we come from a deserialized AST file,
+ // for example.
+
if (PP) {
html::SyntaxHighlight(R, FileID, *PP);
html::HighlightMacros(R, FileID, *PP);