From 258493c1881a8cbe2dfaeb632106c7d6843f3653 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 2 Apr 2008 21:04:20 +0000 Subject: [PATCH] Added path sequence numbers in HTML output of PathDiagnostics. llvm-svn: 49116 --- clang/Driver/HTMLDiagnostics.cpp | 3 +++ clang/lib/Rewrite/HTMLRewrite.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/clang/Driver/HTMLDiagnostics.cpp b/clang/Driver/HTMLDiagnostics.cpp index d4b481bfdad6..69e77bc2fe00 100644 --- a/clang/Driver/HTMLDiagnostics.cpp +++ b/clang/Driver/HTMLDiagnostics.cpp @@ -253,6 +253,9 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, os << "\" class=\"msg\" style=\"margin-left:" << PosNo << "ex\">"; + if (max > 1) + os << "[" << num << "] "; + os << html::EscapeText(P.getString()) << ""; // Insert the new html. diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp index f63b8e4056a1..f6d0d23517a5 100644 --- a/clang/lib/Rewrite/HTMLRewrite.cpp +++ b/clang/lib/Rewrite/HTMLRewrite.cpp @@ -188,6 +188,7 @@ void html::AddHeaderFooterInternalBuiltinCSS(Rewriter& R, unsigned FileID) { << " .msg { margin-top:10px; margin-bottom:10px }\n" << " .mrange { background-color:#ffcc66 }\n" << " .mrange { border-bottom: 1px solid #ff8000 }\n" + << " .PathIndex { font-weight: bold }\n" << "\n\n"; R.InsertStrBefore(StartLoc, os.str());