aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-27 01:53:39 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-27 01:53:39 +0000
commita26ddabc0eb8cf8ea4de1878f84d3b920fc2349f (patch)
treed897919f01ceb304e407085d5e61f0b0a72cd5ec /lib
parent54d1ccbfcf19ddf39444f1b4018dd79487cc847b (diff)
PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description' HTMLDiagnostics: - Output the bug type field as HTML comments scan-build: - Use the bug type field instead of the bug description for the HTML table. - Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/BugReporter.cpp1
-rw-r--r--lib/Driver/HTMLDiagnostics.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index b08f5cb793..f59f89a1a8 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -727,6 +727,7 @@ void BugReporter::EmitWarning(BugReport& R) {
return;
llvm::OwningPtr<PathDiagnostic> D(new PathDiagnostic(R.getName(),
+ R.getDescription(),
R.getCategory()));
GeneratePathDiagnostic(*D.get(), R);
diff --git a/lib/Driver/HTMLDiagnostics.cpp b/lib/Driver/HTMLDiagnostics.cpp
index 2772cf3422..6b60588ca5 100644
--- a/lib/Driver/HTMLDiagnostics.cpp
+++ b/lib/Driver/HTMLDiagnostics.cpp
@@ -246,6 +246,14 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D) {
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<!-- BUGTYPE " << BugType << " -->\n";
+ R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str());
+ }
+
const std::string& BugCategory = D.getCategory();
if (!BugCategory.empty()) {