From: Ted Kremenek Date: Tue, 15 Apr 2008 21:25:08 +0000 (+0000) Subject: For HTML diagnostics, output more information about a bug report. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b0f81323b518429203051bbcd4864bbf4b000a9;p=clang For HTML diagnostics, output more information about a bug report. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49742 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/HTMLDiagnostics.cpp b/Driver/HTMLDiagnostics.cpp index 05e4a51656..327a77f8df 100644 --- a/Driver/HTMLDiagnostics.cpp +++ b/Driver/HTMLDiagnostics.cpp @@ -124,14 +124,26 @@ void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic& D) { if (DirName == ".") DirName = llvm::sys::Path::GetCurrentDirectory().toString(); - // Add the name of the file as an

tag. - + // Add the name of the file as an

tag. + { std::ostringstream os; - os << "

" << html::EscapeText(DirName) - << "/" << html::EscapeText(Entry->getName()) << "

\n"; - + os << "

Bug Summary

\n\n" + "\n\n" + "\n
File:" + << html::EscapeText(DirName) + << html::EscapeText(Entry->getName()) + << "
Location:" + "line " + << (*D.rbegin()).getLocation().getLogicalLineNumber() + << ", column " + << (*D.rbegin()).getLocation().getLogicalColumnNumber() + << "
Description:" + << D.getDescription() + << "
\n" + "

Annotated Source Code

\n"; + R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str()); } diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index 2b844da1fd..bc7864eebd 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/lib/Rewrite/HTMLRewrite.cpp @@ -193,7 +193,7 @@ void html::AddHeaderFooterInternalBuiltinCSS(Rewriter& R, unsigned FileID) { "\n\n"); // Generate footer