added preliminary diagnostics in scan-build results to denote whether
a CF memory leak occurred with GC enabled, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50507 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index c01e4ed..59e477a 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -813,16 +813,16 @@
   virtual void getTransferFunctions(std::vector<GRTransferFuncs*>& TFs) {
     switch (LangOpts.getGCMode()) {
       case LangOptions::NonGC:
-        TFs.push_back(MakeCFRefCountTF(*Ctx, false));
+        TFs.push_back(MakeCFRefCountTF(*Ctx, false, LangOpts));
         break;
         
       case LangOptions::GCOnly:
-        TFs.push_back(MakeCFRefCountTF(*Ctx, true));
+        TFs.push_back(MakeCFRefCountTF(*Ctx, true, LangOpts));
         break;
         
       case LangOptions::HybridGC:
-        TFs.push_back(MakeCFRefCountTF(*Ctx, false));
-        TFs.push_back(MakeCFRefCountTF(*Ctx, true));
+        TFs.push_back(MakeCFRefCountTF(*Ctx, false, LangOpts));
+        TFs.push_back(MakeCFRefCountTF(*Ctx, true, LangOpts));
         break;
     }
   }
diff --git a/Driver/HTMLDiagnostics.cpp b/Driver/HTMLDiagnostics.cpp
index 3e3571c..cb333b9 100644
--- a/Driver/HTMLDiagnostics.cpp
+++ b/Driver/HTMLDiagnostics.cpp
@@ -187,9 +187,16 @@
        << (*D.rbegin()).getLocation().getLogicalColumnNumber()
        << "</a></td></tr>\n"
           "<tr><td class=\"rowname\">Description:</td><td>"
-       << D.getDescription()
-       << "</td></tr>\n</table>\n"
-          "<h3>Annotated Source Code</h3>\n";
+       << D.getDescription() << "</td></tr>\n";
+    
+    // Output any other meta data.
+    
+    for (PathDiagnostic::meta_iterator I=D.meta_begin(), E=D.meta_end();
+         I!=E; ++I) {
+      os << "<tr><td></td><td>" << html::EscapeText(*I) << "</td></tr>\n";
+    }
+    
+    os << "</table>\n<h3>Annotated Source Code</h3>\n";    
     
     R.InsertStrBefore(SourceLocation::getFileLoc(FileID, 0), os.str());
   }