From b23b711ad3dfb96dc9c457bd55c6e959bd1e0b8a Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Thu, 2 Aug 2012 02:26:19 +0000 Subject: [PATCH] [analyzer] Add Prev/Next links to the HTML output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161153 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Rewrite/HTMLRewrite.cpp | 3 ++- lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 26 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index e2da26fc80..236b98fc28 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/lib/Rewrite/HTMLRewrite.cpp @@ -325,11 +325,12 @@ void html::AddHeaderFooterInternalBuiltinCSS(Rewriter& R, FileID FID, " .msgControl { background-color:#bbbbbb; color:#000000 }\n" " .mrange { background-color:#dfddf3 }\n" " .mrange { border-bottom:1px solid #6F9DBE }\n" - " .PathIndex { font-weight: bold; padding:0px 5px 0px 5px; " + " .PathIndex { font-weight: bold; padding:0px 5px; " "margin-right:5px; }\n" " .PathIndex { -webkit-border-radius:8px }\n" " .PathIndexEvent { background-color:#bfba87 }\n" " .PathIndexControl { background-color:#8c8c8c }\n" + " .PathNav a { text-decoration:none; font-size: larger }\n" " .CodeInsertionHint { font-weight: bold; background-color: #10dd10 }\n" " .CodeRemovalHint { background-color:#de1010 }\n" " .CodeRemovalHint { border-bottom:1px solid #6F9DBE }\n" diff --git a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index f1ce8786a1..84fae41d1c 100644 --- a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -428,6 +428,15 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, FileID BugFileID, os << "
" << num << "
"; + + if (num > 1) { + os << "
"; + } + os << ""; } @@ -463,8 +472,21 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, FileID BugFileID, else { os << html::EscapeText(P.getString()); - if (max > 1) - os << ""; + if (max > 1) { + os << ""; + if (num < max) { + os << "
"; + } + + os << ""; + } } os << ""; -- 2.40.0