[cfe-commits] r53343 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRExprEngine.h lib/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Wed Jul 9 12:46:42 PDT 2008


Author: kremenek
Date: Wed Jul  9 14:46:42 2008
New Revision: 53343

URL: http://llvm.org/viewvc/llvm-project?rev=53343&view=rev
Log:
Remove getParentMap() from GRExprEngine.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
    cfe/trunk/lib/Analysis/GRExprEngine.cpp

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

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h Wed Jul  9 14:46:42 2008
@@ -28,7 +28,6 @@
   class BugType;
   class PathDiagnosticClient;
   class Diagnostic;
-  class ParentMap;
   class BugReporterData;
 
 class GRExprEngine {
@@ -53,9 +52,6 @@
   /// G - the simulation graph.
   GraphTy& G;
   
-  /// Parents - a lazily created map from Stmt* to parents.
-  ParentMap* Parents;
-  
   /// Liveness - live-variables information the ValueDecl* and block-level
   ///  Expr* in the CFG.  Used to prune out dead state.
   LiveVariables& Liveness;
@@ -218,11 +214,7 @@
   
   GraphTy& getGraph() { return G; }
   const GraphTy& getGraph() const { return G; }
-    
-  /// getParentMap - Return a map from Stmt* to parents for the function/method
-  ///  body being analyzed.  This map is lazily constructed as needed.
-  ParentMap& getParentMap();
-  
+      
   typedef BugTypeSet::iterator bug_type_iterator;
   typedef BugTypeSet::const_iterator const_bug_type_iterator;
   

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=53343&r1=53342&r2=53343&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Wed Jul  9 14:46:42 2008
@@ -13,7 +13,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/AST/ParentMap.h"
 #include "clang/Analysis/PathSensitive/GRExprEngine.h"
 #include "clang/Analysis/PathSensitive/BugReporter.h"
 #include "clang/Basic/SourceManager.h"
@@ -43,7 +42,6 @@
                            LiveVariables& L)
   : CoreEngine(cfg, CD, Ctx, *this), 
     G(CoreEngine.getGraph()),
-    Parents(0),
     Liveness(L),
     Builder(NULL),
     StateMgr(G.getContext(), G.getAllocator()),
@@ -67,17 +65,6 @@
     delete *I;  
   
   delete [] NSExceptionInstanceRaiseSelectors;
-  
-  delete Parents;
-}
-
-ParentMap& GRExprEngine::getParentMap() {
-  if (!Parents) {
-    Stmt* Body = getGraph().getCodeDecl().getCodeBody();
-    Parents = new ParentMap(Body);  
-  }
-  
-  return *Parents;
 }
 
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list