aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-02 21:42:01 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-02 21:42:01 +0000
commit2f10398814e8d58cce029a7e73af21bb274dcd42 (patch)
tree4dd4389ae2175e6de862dcb0815a66fdeab910fc
parent025fedcbb98870e7739c942cee68c6f1c512bc46 (diff)
Update HTML diagnostics to honor the different between 'event' and 'control-flow' diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65877 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Frontend/HTMLDiagnostics.cpp8
-rw-r--r--lib/Rewrite/HTMLRewrite.cpp5
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/Frontend/HTMLDiagnostics.cpp b/lib/Frontend/HTMLDiagnostics.cpp
index cb05e55a43..9996fbbcd7 100644
--- a/lib/Frontend/HTMLDiagnostics.cpp
+++ b/lib/Frontend/HTMLDiagnostics.cpp
@@ -418,7 +418,13 @@ void HTMLDiagnostics::HandlePiece(Rewriter& R, FileID BugFileID,
else
os << "Path" << num;
- os << "\" class=\"msg\" style=\"margin-left:" << PosNo << "ex";
+ os << "\" class=\"msg";
+ switch (P.getKind()) {
+ default: break;
+ case PathDiagnosticPiece::Event: os << " msgEvent"; break;
+ case PathDiagnosticPiece::ControlFlow: os << " msgControl"; break;
+ }
+ os << "\" style=\"margin-left:" << PosNo << "ex";
if (em < max_line/2) os << "; max-width:" << em << "em";
os << "\">";
diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp
index 692af80488..b1f5cee366 100644
--- a/lib/Rewrite/HTMLRewrite.cpp
+++ b/lib/Rewrite/HTMLRewrite.cpp
@@ -307,15 +307,16 @@ void html::AddHeaderFooterInternalBuiltinCSS(Rewriter& R, FileID FID,
" .num { color:#444444 }\n"
" .line { padding-left: 1ex; border-left: 3px solid #ccc }\n"
" .line { white-space: pre }\n"
- " .msg { background-color:#fff8b4; color:#000000 }\n"
" .msg { -webkit-box-shadow:1px 1px 7px #000 }\n"
" .msg { -webkit-border-radius:5px }\n"
" .msg { font-family:Helvetica, sans-serif; font-size: smaller }\n"
- " .msg { font-weight: bold }\n"
" .msg { float:left }\n"
" .msg { padding:0.5em 1ex 0.5em 1ex }\n"
" .msg { margin-top:10px; margin-bottom:10px }\n"
+ " .msg { font-weight:bold }\n"
" .msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap;}\n"
+ " .msgEvent { background-color:#fff8b4; color:#000000 }\n"
+ " .msgControl { background-color:#bbbbbb; color:#444444 }\n"
" .mrange { background-color:#dfddf3 }\n"
" .mrange { border-bottom:1px solid #6F9DBE }\n"
" .PathIndex { font-weight: bold }\n"