When using -analyzer-output-plist always output a plist file even if it contains no error reports.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62871 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/AnalysisConsumer.cpp b/Driver/AnalysisConsumer.cpp
index 1ada515..236cc1d 100644
--- a/Driver/AnalysisConsumer.cpp
+++ b/Driver/AnalysisConsumer.cpp
@@ -207,7 +207,7 @@
       if (C.PD.get() == 0 && !C.HTMLDir.empty()) {
         switch (C.DC) {
           default:
-#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)\
+#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE)\
 case PD_##NAME: C.PD.reset(CREATEFN(C.HTMLDir, C.PP, C.PPF)); break;
 #include "Analyses.def"
         }
@@ -288,6 +288,15 @@
         CreateConstraintMgr = ManagerRegistry::ConstraintMgrCreator;
       else
         CreateConstraintMgr = CreateBasicConstraintManager;
+      
+      // Some DiagnosticClients should be created all the time instead of
+      // lazily.  Create those now.
+      switch (C.DC) {
+        default: break;
+#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE)\
+case PD_##NAME: if (AUTOCREATE) getPathDiagnosticClient(); break;
+#include "Analyses.def"
+      }      
     }
 
   };