Display the exploded graph before calling BugReporter.FlushReports(). The latter
deletes all registered BugTypes from BugReporter, and thus we need to display
the graph first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66623 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/AnalysisConsumer.cpp b/Driver/AnalysisConsumer.cpp
index e37e2c1..f19ff17 100644
--- a/Driver/AnalysisConsumer.cpp
+++ b/Driver/AnalysisConsumer.cpp
@@ -546,13 +546,13 @@
   // Release the auditor (if any) so that it doesn't monitor the graph
   // created BugReporter.
   ExplodedNodeImpl::SetAuditor(0);
-  
-  // Display warnings.
-  Eng.getBugReporter().FlushReports();
-  
+
   // Visualize the exploded graph.
   if (mgr.shouldVisualizeGraphviz())
     Eng.ViewGraph(mgr.shouldTrimGraph());
+  
+  // Display warnings.
+  Eng.getBugReporter().FlushReports();
 }
 
 static void ActionCheckerCFRefAux(AnalysisManager& mgr, bool GCEnabled,