From: Ted Kremenek Date: Mon, 3 Aug 2009 23:44:55 +0000 (+0000) Subject: Emit a special 'BUGMETAEND' comment to aid in the postprocessing of HTML bug reports. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b4d45c911933c860224aef52bc3d8a7b3675945;p=clang Emit a special 'BUGMETAEND' comment to aid in the postprocessing of HTML bug reports. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78021 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/HTMLDiagnostics.cpp b/lib/Frontend/HTMLDiagnostics.cpp index 160da7c097..9b86755538 100644 --- a/lib/Frontend/HTMLDiagnostics.cpp +++ b/lib/Frontend/HTMLDiagnostics.cpp @@ -274,56 +274,37 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) { } // Embed meta-data tags. - - const std::string& BugDesc = D.getDescription(); - - if (!BugDesc.empty()) { - std::string s; - llvm::raw_string_ostream os(s); - os << "\n\n"; - R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str()); - } - - const std::string& BugType = D.getBugType(); - if (!BugType.empty()) { + { std::string s; llvm::raw_string_ostream os(s); - os << "\n\n"; - R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str()); - } - const std::string& BugCategory = D.getCategory(); - - if (!BugCategory.empty()) { - std::string s; - llvm::raw_string_ostream os(s); - os << "\n\n"; - R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str()); - } + const std::string& BugDesc = D.getDescription(); + if (!BugDesc.empty()) + os << "\n\n"; + + const std::string& BugType = D.getBugType(); + if (!BugType.empty()) + os << "\n\n"; - { - std::string s; - llvm::raw_string_ostream os(s); + const std::string& BugCategory = D.getCategory(); + if (!BugCategory.empty()) + os << "\n\n"; + os << "\n\n"; - R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str()); - } - - { - std::string s; - llvm::raw_string_ostream os(s); + os << "\n\n"; - R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str()); - } - - { - std::string s; - llvm::raw_string_ostream os(s); + os << "\n\n"; + + // Mark the end of the tags. + os << "\n\n"; + + // Insert the text. R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str()); } - + // Add CSS, header, and footer. html::AddHeaderFooterInternalBuiltinCSS(R, FID, Entry->getName());