aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-02 02:26:19 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-02 02:26:19 +0000
commitb23b711ad3dfb96dc9c457bd55c6e959bd1e0b8a (patch)
tree50cbcff7adddfd0e158ab75f4b00a70b61e8eee2 /lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
parent0eb6c37dd4e4ad8fa2363003dea270f9fd6c2969 (diff)
[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
Diffstat (limited to 'lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp26
1 files changed, 24 insertions, 2 deletions
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 << "<div class=\"PathIndex";
if (Kind) os << " PathIndex" << Kind;
os << "\">" << num << "</div>";
+
+ if (num > 1) {
+ os << "</td><td><div class=\"PathNav\"><a href=\"#Path"
+ << (num - 1)
+ << "\" title=\"Previous event ("
+ << (num - 1)
+ << ")\">&#x2190;</a></div></td>";
+ }
+
os << "</td><td>";
}
@@ -463,8 +472,21 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, FileID BugFileID,
else {
os << html::EscapeText(P.getString());
- if (max > 1)
- os << "</td></tr></table>";
+ if (max > 1) {
+ os << "</td>";
+ if (num < max) {
+ os << "<td><div class=\"PathNav\"><a href=\"#";
+ if (num == max - 1)
+ os << "EndPath";
+ else
+ os << "Path" << (num + 1);
+ os << "\" title=\"Next event ("
+ << (num + 1)
+ << ")\">&#x2192;</a></div></td>";
+ }
+
+ os << "</tr></table>";
+ }
}
os << "</div></td></tr>";