Add "category" to BugTypes, allowing bugs to be grouped.
Changed casing of many bug names.  The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56385 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/HTMLDiagnostics.cpp b/lib/Driver/HTMLDiagnostics.cpp
index 5025e87..22d3da9 100644
--- a/lib/Driver/HTMLDiagnostics.cpp
+++ b/lib/Driver/HTMLDiagnostics.cpp
@@ -259,6 +259,15 @@
     R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str());
   }
   
+  const std::string& BugCategory = D.getCategory();
+  
+  if (!BugCategory.empty()) {
+    std::string s;
+    llvm::raw_string_ostream os(s);
+    os << "\n<!-- BUGCATEGORY " << BugCategory << " -->\n";
+    R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str());
+  }
+  
   {
     std::string s;
     llvm::raw_string_ostream os(s);