Embed "DESC" tag in HTML reports.

llvm-svn: 49084
diff --git a/clang/Driver/HTMLDiagnostics.cpp b/clang/Driver/HTMLDiagnostics.cpp
index 917949fa..79eae90 100644
--- a/clang/Driver/HTMLDiagnostics.cpp
+++ b/clang/Driver/HTMLDiagnostics.cpp
@@ -132,6 +132,16 @@
     os << "/" << html::EscapeText(Entry->getName()) << "</h1>\n";
 
     R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str());
+  }
+  
+  // Add the bug description.
+  
+  const std::string& BugDesc = D.getDescription();
+  
+  if (!BugDesc.empty()) {
+    std::ostringstream os;
+    os << "<!-- BUGDESC " << BugDesc << " -->\n";
+    R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str());
   }  
 
   // Add CSS, header, and footer.