]> granicus.if.org Git - clang/commitdiff
Embed "DESC" tag in HTML reports.
authorTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 07:04:46 +0000 (07:04 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 07:04:46 +0000 (07:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49084 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/HTMLDiagnostics.cpp

index 917949fac179fad20887967ba58bebdf578392f8..79eae90f1256a69724b018221a128412af3a66b2 100644 (file)
@@ -131,6 +131,16 @@ void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic& D) {
     
     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());
   }