[cfe-commits] r86110 - /cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisManager.h

Ted Kremenek kremenek at apple.com
Wed Nov 4 18:17:34 PST 2009


Author: kremenek
Date: Wed Nov  4 20:17:33 2009
New Revision: 86110

URL: http://llvm.org/viewvc/llvm-project?rev=86110&view=rev
Log:
AnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when they are destroyed.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisManager.h

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisManager.h?rev=86110&r1=86109&r2=86110&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisManager.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisManager.h Wed Nov  4 20:17:33 2009
@@ -66,6 +66,8 @@
       VisualizeEGDot(vizdot), VisualizeEGUbi(vizubi), PurgeDead(purge),
       EagerlyAssume(eager), TrimGraph(trim) {}
   
+  ~AnalysisManager() { FlushDiagnostics(); }
+  
   void ClearContexts() {
     LocCtxMgr.clear();
     AnaCtxMgr.clear();
@@ -98,6 +100,11 @@
   virtual PathDiagnosticClient *getPathDiagnosticClient() {
     return PD.get();
   }
+  
+  void FlushDiagnostics() {
+    if (PD.get())
+      PD->FlushDiagnostics();
+  }
 
   bool shouldVisualizeGraphviz() const { return VisualizeEGDot; }
 





More information about the cfe-commits mailing list