aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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()) {