diff options
| -rw-r--r-- | clang/Driver/HTMLDiagnostics.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/Driver/HTMLDiagnostics.cpp b/clang/Driver/HTMLDiagnostics.cpp index 917949fac17..79eae90f125 100644 --- a/clang/Driver/HTMLDiagnostics.cpp +++ b/clang/Driver/HTMLDiagnostics.cpp @@ -132,6 +132,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()); } // Add CSS, header, and footer. |

