]> granicus.if.org Git - clang/commitdiff
Renamed GRNodeBuilder to GRStmtNodeBuilder.
authorTed Kremenek <kremenek@apple.com>
Tue, 29 Jan 2008 22:11:49 +0000 (22:11 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 29 Jan 2008 22:11:49 +0000 (22:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46531 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRConstants.cpp
Analysis/GREngine.cpp
include/clang/Analysis/PathSensitive/ExplodedGraph.h
include/clang/Analysis/PathSensitive/GREngine.h

index e846aac45136bc290bfa00cfaf254ac551b3b67a..6d89b29b61c0067da7a7418f7e840b08fdffb0ae 100644 (file)
@@ -730,7 +730,7 @@ class VISIBILITY_HIDDEN GRConstants {
     
 public:
   typedef ValueMapTy StateTy;
-  typedef GRNodeBuilder<GRConstants> NodeBuilder;
+  typedef GRStmtNodeBuilder<GRConstants> NodeBuilder;
   typedef ExplodedGraph<GRConstants> GraphTy;
   typedef GraphTy::NodeTy NodeTy;
   
@@ -765,7 +765,7 @@ protected:
   ///  Expr* in the CFG.  Used to prune out dead state.
   LiveVariables Liveness;
 
-  /// Builder - The current GRNodeBuilder which is used when building the nodes
+  /// Builder - The current GRStmtNodeBuilder which is used when building the nodes
   ///  for a given statement.
   NodeBuilder* Builder;
 
index 65cfb24fe3d44ed2c12c25dcf0b196254565eae6..6aaf0d89e12b5ec516e141fdcc046ad772e43197 100644 (file)
@@ -139,7 +139,7 @@ void GREngineImpl::HandleBlockEntrance(const BlockEntrance& L,
                                        ExplodedNodeImpl* Pred) {
   
   if (Stmt* S = L.getFirstStmt()) {
-    GRNodeBuilderImpl Builder(L.getBlock(), 0, Pred, this);
+    GRStmtNodeBuilderImpl Builder(L.getBlock(), 0, Pred, this);
     ProcessStmt(S, Builder);
   }
   else 
@@ -167,7 +167,7 @@ void GREngineImpl::HandlePostStmt(const PostStmt& L, CFGBlock* B,
   if (StmtIdx == B->size())
     HandleBlockExit(B, Pred);
   else {
-    GRNodeBuilderImpl Builder(B, StmtIdx, Pred, this);
+    GRStmtNodeBuilderImpl Builder(B, StmtIdx, Pred, this);
     ProcessStmt((*B)[StmtIdx], Builder);
   }
 }
@@ -204,19 +204,19 @@ void GREngineImpl::GenerateNode(const ProgramPoint& Loc, void* State,
   if (IsNew) WList->Enqueue(GRWorkListUnit(Node));
 }
 
-GRNodeBuilderImpl::GRNodeBuilderImpl(CFGBlock* b, unsigned idx,
+GRStmtNodeBuilderImpl::GRStmtNodeBuilderImpl(CFGBlock* b, unsigned idx,
                                      ExplodedNodeImpl* N, GREngineImpl* e)
   : Eng(*e), B(*b), Idx(idx), LastNode(N), Populated(false) {
   Deferred.insert(N);
 }
 
-GRNodeBuilderImpl::~GRNodeBuilderImpl() {
+GRStmtNodeBuilderImpl::~GRStmtNodeBuilderImpl() {
   for (DeferredTy::iterator I=Deferred.begin(), E=Deferred.end(); I!=E; ++I)
     if (!(*I)->isInfeasible())
       GenerateAutoTransition(*I);
 }
 
-void GRNodeBuilderImpl::GenerateAutoTransition(ExplodedNodeImpl* N) {
+void GRStmtNodeBuilderImpl::GenerateAutoTransition(ExplodedNodeImpl* N) {
   assert (!N->isInfeasible());
   
   PostStmt Loc(getStmt());
@@ -236,7 +236,7 @@ void GRNodeBuilderImpl::GenerateAutoTransition(ExplodedNodeImpl* N) {
     Eng.WList->Enqueue(Succ, B, Idx+1);
 }
 
-ExplodedNodeImpl* GRNodeBuilderImpl::generateNodeImpl(Stmt* S, void* State,
+ExplodedNodeImpl* GRStmtNodeBuilderImpl::generateNodeImpl(Stmt* S, void* State,
                                                       ExplodedNodeImpl* Pred) {
   
   bool IsNew;
index 9545e7c0d8b106da6120f203e899f52d5dd090da..a7f6c3c005421a8f859228bd2a556f92862ecbe3 100644 (file)
@@ -28,7 +28,7 @@ namespace clang {
 
 class GREngineImpl;
 class ExplodedNodeImpl;
-class GRNodeBuilderImpl;
+class GRStmtNodeBuilderImpl;
 class CFG;
 class ASTContext;
 class FunctionDecl;
@@ -38,7 +38,7 @@ class ExplodedNodeImpl : public llvm::FoldingSetNode {
 protected:
   friend class ExplodedGraphImpl;
   friend class GREngineImpl;
-  friend class GRNodeBuilderImpl;
+  friend class GRStmtNodeBuilderImpl;
   
   class NodeGroup {
     enum { Size1 = 0x0, SizeOther = 0x1, Infeasible = 0x2, Flags = 0x3 };
@@ -192,7 +192,7 @@ public:
 class ExplodedGraphImpl {
 protected:
   friend class GREngineImpl;
-  friend class GRNodeBuilderImpl;
+  friend class GRStmtNodeBuilderImpl;
   
   // Type definitions.
   typedef llvm::DenseMap<ProgramPoint,void*>        EdgeNodeSetMap;
index 52a323dfb681551cf56ce414b34040f7342d4389..e783d8e7d0f91f320b06531eafb01ab6c79e8531 100644 (file)
 
 namespace clang {
   
-class GRNodeBuilderImpl;
+class GRStmtNodeBuilderImpl;
 class GRWorkList;
   
 class GREngineImpl {
 protected:
-  friend class GRNodeBuilderImpl;
+  friend class GRStmtNodeBuilderImpl;
   
   typedef llvm::DenseMap<Stmt*,Stmt*> ParentMapTy;
     
@@ -62,7 +62,7 @@ protected:
 
   virtual void* ProcessEOP(CFGBlock* Blk, void* State) = 0;  
 
-  virtual void ProcessStmt(Stmt* S, GRNodeBuilderImpl& Builder) = 0;
+  virtual void ProcessStmt(Stmt* S, GRStmtNodeBuilderImpl& Builder) = 0;
 
   virtual void ProcessTerminator(Stmt* Terminator, CFGBlock* B, 
                                  ExplodedNodeImpl* Pred) = 0;
@@ -84,7 +84,7 @@ public:
   CFG& getCFG() { return G->getCFG(); }
 };
   
-class GRNodeBuilderImpl {
+class GRStmtNodeBuilderImpl {
   GREngineImpl& Eng;
   CFGBlock& B;
   const unsigned Idx;
@@ -98,10 +98,10 @@ class GRNodeBuilderImpl {
   void GenerateAutoTransition(ExplodedNodeImpl* N);
   
 public:
-  GRNodeBuilderImpl(CFGBlock* b, unsigned idx,
+  GRStmtNodeBuilderImpl(CFGBlock* b, unsigned idx,
                     ExplodedNodeImpl* N, GREngineImpl* e);      
   
-  ~GRNodeBuilderImpl();
+  ~GRStmtNodeBuilderImpl();
   
   const ExplodedGraphImpl& getGraph() const { return *Eng.G; }
   
@@ -124,16 +124,16 @@ public:
 };
 
 template<typename CHECKER>
-class GRNodeBuilder  {
+class GRStmtNodeBuilder  {
   typedef CHECKER                                CheckerTy; 
   typedef typename CheckerTy::StateTy            StateTy;
   typedef ExplodedGraph<CheckerTy>               GraphTy;
   typedef typename GraphTy::NodeTy               NodeTy;
   
-  GRNodeBuilderImpl& NB;
+  GRStmtNodeBuilderImpl& NB;
   
 public:
-  GRNodeBuilder(GRNodeBuilderImpl& nb) : NB(nb) {}
+  GRStmtNodeBuilder(GRStmtNodeBuilderImpl& nb) : NB(nb) {}
   
   const GraphTy& getGraph() const {
     return static_cast<const GraphTy&>(NB.getGraph());
@@ -177,8 +177,8 @@ protected:
     return State;
   }
   
-  virtual void ProcessStmt(Stmt* S, GRNodeBuilderImpl& BuilderImpl) {
-    GRNodeBuilder<CHECKER> Builder(BuilderImpl);
+  virtual void ProcessStmt(Stmt* S, GRStmtNodeBuilderImpl& BuilderImpl) {
+    GRStmtNodeBuilder<CHECKER> Builder(BuilderImpl);
     Checker->ProcessStmt(S, Builder);
   }