diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-16 16:39:56 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-16 16:39:56 +0000 |
commit | f2e6fcf3bfd84460ec2c22c2c05f4e8b9c58017e (patch) | |
tree | 461e55ea80c25b19b796dc27b5bc6e6218f7f3e1 /clang/Driver/HTMLPrint.cpp | |
parent | a3ee1a38a335828b44ec2d329a846cef292874f7 (diff) | |
download | bcm5719-llvm-f2e6fcf3bfd84460ec2c22c2c05f4e8b9c58017e.tar.gz bcm5719-llvm-f2e6fcf3bfd84460ec2c22c2c05f4e8b9c58017e.zip |
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.
llvm-svn: 49796
Diffstat (limited to 'clang/Driver/HTMLPrint.cpp')
-rw-r--r-- | clang/Driver/HTMLPrint.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/Driver/HTMLPrint.cpp b/clang/Driver/HTMLPrint.cpp index 2b014899631..54678dea3e3 100644 --- a/clang/Driver/HTMLPrint.cpp +++ b/clang/Driver/HTMLPrint.cpp @@ -59,8 +59,10 @@ HTMLPrinter::~HTMLPrinter() { 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); |