[cfe-commits] r46531 - in /cfe/trunk: Analysis/GRConstants.cpp Analysis/GREngine.cpp include/clang/Analysis/PathSensitive/ExplodedGraph.h include/clang/Analysis/PathSensitive/GREngine.h
Ted Kremenek
kremenek at apple.com
Tue Jan 29 14:11:50 PST 2008
Author: kremenek
Date: Tue Jan 29 16:11:49 2008
New Revision: 46531
URL: http://llvm.org/viewvc/llvm-project?rev=46531&view=rev
Log:
Renamed GRNodeBuilder to GRStmtNodeBuilder.
Modified:
cfe/trunk/Analysis/GRConstants.cpp
cfe/trunk/Analysis/GREngine.cpp
cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h
cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h
Modified: cfe/trunk/Analysis/GRConstants.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRConstants.cpp?rev=46531&r1=46530&r2=46531&view=diff
==============================================================================
--- cfe/trunk/Analysis/GRConstants.cpp (original)
+++ cfe/trunk/Analysis/GRConstants.cpp Tue Jan 29 16:11:49 2008
@@ -730,7 +730,7 @@
public:
typedef ValueMapTy StateTy;
- typedef GRNodeBuilder<GRConstants> NodeBuilder;
+ typedef GRStmtNodeBuilder<GRConstants> NodeBuilder;
typedef ExplodedGraph<GRConstants> GraphTy;
typedef GraphTy::NodeTy NodeTy;
@@ -765,7 +765,7 @@
/// 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;
Modified: cfe/trunk/Analysis/GREngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GREngine.cpp?rev=46531&r1=46530&r2=46531&view=diff
==============================================================================
--- cfe/trunk/Analysis/GREngine.cpp (original)
+++ cfe/trunk/Analysis/GREngine.cpp Tue Jan 29 16:11:49 2008
@@ -139,7 +139,7 @@
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 @@
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 @@
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 @@
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;
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h?rev=46531&r1=46530&r2=46531&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h Tue Jan 29 16:11:49 2008
@@ -28,7 +28,7 @@
class GREngineImpl;
class ExplodedNodeImpl;
-class GRNodeBuilderImpl;
+class GRStmtNodeBuilderImpl;
class CFG;
class ASTContext;
class FunctionDecl;
@@ -38,7 +38,7 @@
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 @@
class ExplodedGraphImpl {
protected:
friend class GREngineImpl;
- friend class GRNodeBuilderImpl;
+ friend class GRStmtNodeBuilderImpl;
// Type definitions.
typedef llvm::DenseMap<ProgramPoint,void*> EdgeNodeSetMap;
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h?rev=46531&r1=46530&r2=46531&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GREngine.h Tue Jan 29 16:11:49 2008
@@ -21,12 +21,12 @@
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 @@
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 @@
CFG& getCFG() { return G->getCFG(); }
};
-class GRNodeBuilderImpl {
+class GRStmtNodeBuilderImpl {
GREngineImpl& Eng;
CFGBlock& B;
const unsigned Idx;
@@ -98,10 +98,10 @@
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 @@
};
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 @@
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);
}
More information about the cfe-commits
mailing list