[cfe-commits] r123211 - in /cfe/trunk: include/clang/StaticAnalyzer/PathSensitive/ lib/StaticAnalyzer/ lib/StaticAnalyzer/Checkers/
Ted Kremenek
kremenek at apple.com
Mon Jan 10 18:34:45 PST 2011
Author: kremenek
Date: Mon Jan 10 20:34:45 2011
New Revision: 123211
URL: http://llvm.org/viewvc/llvm-project?rev=123211&view=rev
Log:
Rename misc. methods in GRSubEngine to start
with a lower-case letter. No functionality change.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Checker.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExprEngine.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/SubEngine.h
cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/TransferFuncs.h
cfe/trunk/lib/StaticAnalyzer/CFRefCount.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
cfe/trunk/lib/StaticAnalyzer/CoreEngine.cpp
cfe/trunk/lib/StaticAnalyzer/GRState.cpp
cfe/trunk/lib/StaticAnalyzer/SimpleConstraintManager.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Checker.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Checker.h?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Checker.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/Checker.h Mon Jan 10 20:34:45 2011
@@ -264,7 +264,7 @@
virtual void PreVisitBind(CheckerContext &C, const Stmt *StoreE,
SVal location, SVal val) {}
virtual void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper) {}
- virtual void evalEndPath(EndPathNodeBuilder &B, void *tag,
+ virtual void evalEndPath(EndOfFunctionNodeBuilder &B, void *tag,
ExprEngine &Eng) {}
virtual void MarkLiveSymbols(const GRState *state, SymbolReaper &SymReaper) {}
@@ -287,7 +287,7 @@
return state;
}
- virtual bool WantsRegionChangeUpdate(const GRState *state) { return false; }
+ virtual bool wantsRegionChangeUpdate(const GRState *state) { return false; }
virtual const GRState *EvalRegionChanges(const GRState *state,
const MemRegion * const *Begin,
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h Mon Jan 10 20:34:45 2011
@@ -40,7 +40,7 @@
friend class BranchNodeBuilder;
friend class IndirectGotoNodeBuilder;
friend class SwitchNodeBuilder;
- friend class EndPathNodeBuilder;
+ friend class EndOfFunctionNodeBuilder;
friend class CallEnterNodeBuilder;
friend class CallExitNodeBuilder;
@@ -87,41 +87,41 @@
return SubEng.getInitialState(InitLoc);
}
- void ProcessEndPath(EndPathNodeBuilder& Builder) {
- SubEng.ProcessEndPath(Builder);
+ void processEndOfFunction(EndOfFunctionNodeBuilder& Builder) {
+ SubEng.processEndOfFunction(Builder);
}
- void ProcessElement(const CFGElement E, StmtNodeBuilder& Builder) {
- SubEng.ProcessElement(E, Builder);
+ void processCFGElement(const CFGElement E, StmtNodeBuilder& Builder) {
+ SubEng.processCFGElement(E, Builder);
}
- bool ProcessBlockEntrance(const CFGBlock* Blk, const ExplodedNode *Pred,
+ bool processCFGBlockEntrance(const CFGBlock* Blk, const ExplodedNode *Pred,
BlockCounter BC) {
- return SubEng.ProcessBlockEntrance(Blk, Pred, BC);
+ return SubEng.processCFGBlockEntrance(Blk, Pred, BC);
}
- void ProcessBranch(const Stmt* Condition, const Stmt* Terminator,
+ void processBranch(const Stmt* Condition, const Stmt* Terminator,
BranchNodeBuilder& Builder) {
- SubEng.ProcessBranch(Condition, Terminator, Builder);
+ SubEng.processBranch(Condition, Terminator, Builder);
}
- void ProcessIndirectGoto(IndirectGotoNodeBuilder& Builder) {
- SubEng.ProcessIndirectGoto(Builder);
+ void processIndirectGoto(IndirectGotoNodeBuilder& Builder) {
+ SubEng.processIndirectGoto(Builder);
}
- void ProcessSwitch(SwitchNodeBuilder& Builder) {
- SubEng.ProcessSwitch(Builder);
+ void processSwitch(SwitchNodeBuilder& Builder) {
+ SubEng.processSwitch(Builder);
}
- void ProcessCallEnter(CallEnterNodeBuilder &Builder) {
- SubEng.ProcessCallEnter(Builder);
+ void processCallEnter(CallEnterNodeBuilder &Builder) {
+ SubEng.processCallEnter(Builder);
}
- void ProcessCallExit(CallExitNodeBuilder &Builder) {
- SubEng.ProcessCallExit(Builder);
+ void processCallExit(CallExitNodeBuilder &Builder) {
+ SubEng.processCallExit(Builder);
}
private:
@@ -439,7 +439,7 @@
const GRState* getState() const { return Pred->State; }
};
-class EndPathNodeBuilder {
+class EndOfFunctionNodeBuilder {
CoreEngine &Eng;
const CFGBlock& B;
ExplodedNode* Pred;
@@ -448,10 +448,10 @@
bool HasGeneratedNode;
public:
- EndPathNodeBuilder(const CFGBlock* b, ExplodedNode* N, CoreEngine* e)
+ EndOfFunctionNodeBuilder(const CFGBlock* b, ExplodedNode* N, CoreEngine* e)
: Eng(*e), B(*b), Pred(N), HasGeneratedNode(false) {}
- ~EndPathNodeBuilder();
+ ~EndOfFunctionNodeBuilder();
WorkList &getWorkList() { return *Eng.WList; }
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExplodedGraph.h?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExplodedGraph.h Mon Jan 10 20:34:45 2011
@@ -54,7 +54,7 @@
friend class BranchNodeBuilder;
friend class IndirectGotoNodeBuilder;
friend class SwitchNodeBuilder;
- friend class EndPathNodeBuilder;
+ friend class EndOfFunctionNodeBuilder;
class NodeGroup {
enum { Size1 = 0x0, SizeOther = 0x1, AuxFlag = 0x2, Mask = 0x3 };
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExprEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExprEngine.h?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExprEngine.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/ExprEngine.h Mon Jan 10 20:34:45 2011
@@ -77,7 +77,7 @@
enum CallbackKind {
PreVisitStmtCallback,
PostVisitStmtCallback,
- ProcessAssumeCallback,
+ processAssumeCallback,
EvalRegionChangesCallback
};
@@ -176,9 +176,9 @@
return static_cast<CHECKER*>(lookupChecker(CHECKER::getTag()));
}
- /// ProcessElement - Called by CoreEngine. Used to generate new successor
+ /// processCFGElement - Called by CoreEngine. Used to generate new successor
/// nodes by processing the 'effects' of a CFG element.
- void ProcessElement(const CFGElement E, StmtNodeBuilder& builder);
+ void processCFGElement(const CFGElement E, StmtNodeBuilder& builder);
void ProcessStmt(const CFGStmt S, StmtNodeBuilder &builder);
@@ -193,49 +193,49 @@
void ProcessTemporaryDtor(const CFGTemporaryDtor D,
StmtNodeBuilder &builder);
- /// ProcessBlockEntrance - Called by CoreEngine when start processing
+ /// processCFGBlockEntrance - Called by CoreEngine when start processing
/// a CFGBlock. This method returns true if the analysis should continue
/// exploring the given path, and false otherwise.
- bool ProcessBlockEntrance(const CFGBlock* B, const ExplodedNode *Pred,
+ bool processCFGBlockEntrance(const CFGBlock* B, const ExplodedNode *Pred,
BlockCounter BC);
/// ProcessBranch - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a branch condition.
- void ProcessBranch(const Stmt* Condition, const Stmt* Term,
+ void processBranch(const Stmt* Condition, const Stmt* Term,
BranchNodeBuilder& builder);
- /// ProcessIndirectGoto - Called by CoreEngine. Used to generate successor
+ /// processIndirectGoto - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a computed goto jump.
- void ProcessIndirectGoto(IndirectGotoNodeBuilder& builder);
+ void processIndirectGoto(IndirectGotoNodeBuilder& builder);
/// ProcessSwitch - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a switch statement.
- void ProcessSwitch(SwitchNodeBuilder& builder);
+ void processSwitch(SwitchNodeBuilder& builder);
/// ProcessEndPath - Called by CoreEngine. Used to generate end-of-path
/// nodes when the control reaches the end of a function.
- void ProcessEndPath(EndPathNodeBuilder& builder);
+ void processEndOfFunction(EndOfFunctionNodeBuilder& builder);
/// Generate the entry node of the callee.
- void ProcessCallEnter(CallEnterNodeBuilder &builder);
+ void processCallEnter(CallEnterNodeBuilder &builder);
/// Generate the first post callsite node.
- void ProcessCallExit(CallExitNodeBuilder &builder);
+ void processCallExit(CallExitNodeBuilder &builder);
/// Called by CoreEngine when the analysis worklist has terminated.
- void ProcessEndWorklist(bool hasWorkRemaining);
+ void processEndWorklist(bool hasWorkRemaining);
/// evalAssume - Callback function invoked by the ConstraintManager when
/// making assumptions about state values.
- const GRState *ProcessAssume(const GRState *state, SVal cond,bool assumption);
+ const GRState *processAssume(const GRState *state, SVal cond,bool assumption);
- /// WantsRegionChangeUpdate - Called by GRStateManager to determine if a
- /// region change should trigger a ProcessRegionChanges update.
- bool WantsRegionChangeUpdate(const GRState* state);
+ /// wantsRegionChangeUpdate - Called by GRStateManager to determine if a
+ /// region change should trigger a processRegionChanges update.
+ bool wantsRegionChangeUpdate(const GRState* state);
- /// ProcessRegionChanges - Called by GRStateManager whenever a change is made
+ /// processRegionChanges - Called by GRStateManager whenever a change is made
/// to the store. Used to update checkers that track region values.
- const GRState* ProcessRegionChanges(const GRState *state,
+ const GRState* processRegionChanges(const GRState *state,
const MemRegion * const *Begin,
const MemRegion * const *End);
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/SubEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/SubEngine.h?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/SubEngine.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/SubEngine.h Mon Jan 10 20:34:45 2011
@@ -33,7 +33,7 @@
class BranchNodeBuilder;
class IndirectGotoNodeBuilder;
class SwitchNodeBuilder;
-class EndPathNodeBuilder;
+class EndOfFunctionNodeBuilder;
class CallEnterNodeBuilder;
class CallExitNodeBuilder;
class MemRegion;
@@ -50,60 +50,61 @@
/// Called by CoreEngine. Used to generate new successor
/// nodes by processing the 'effects' of a block-level statement.
- virtual void ProcessElement(const CFGElement E, StmtNodeBuilder& builder)=0;
+ virtual void processCFGElement(const CFGElement E, StmtNodeBuilder& builder)=0;
/// Called by CoreEngine when start processing
/// a CFGBlock. This method returns true if the analysis should continue
/// exploring the given path, and false otherwise.
- virtual bool ProcessBlockEntrance(const CFGBlock* B, const ExplodedNode *Pred,
- BlockCounter BC) = 0;
+ virtual bool processCFGBlockEntrance(const CFGBlock* B,
+ const ExplodedNode *Pred,
+ BlockCounter BC) = 0;
/// Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a branch condition.
- virtual void ProcessBranch(const Stmt* Condition, const Stmt* Term,
+ virtual void processBranch(const Stmt* Condition, const Stmt* Term,
BranchNodeBuilder& builder) = 0;
/// Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a computed goto jump.
- virtual void ProcessIndirectGoto(IndirectGotoNodeBuilder& builder) = 0;
+ virtual void processIndirectGoto(IndirectGotoNodeBuilder& builder) = 0;
/// Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a switch statement.
- virtual void ProcessSwitch(SwitchNodeBuilder& builder) = 0;
+ virtual void processSwitch(SwitchNodeBuilder& builder) = 0;
- /// ProcessEndPath - Called by CoreEngine. Used to generate end-of-path
- /// nodes when the control reaches the end of a function.
- virtual void ProcessEndPath(EndPathNodeBuilder& builder) = 0;
+ /// Called by CoreEngine. Used to generate end-of-path
+ /// nodes when the control reaches the end of a function.
+ virtual void processEndOfFunction(EndOfFunctionNodeBuilder& builder) = 0;
// Generate the entry node of the callee.
- virtual void ProcessCallEnter(CallEnterNodeBuilder &builder) = 0;
+ virtual void processCallEnter(CallEnterNodeBuilder &builder) = 0;
// Generate the first post callsite node.
- virtual void ProcessCallExit(CallExitNodeBuilder &builder) = 0;
+ virtual void processCallExit(CallExitNodeBuilder &builder) = 0;
/// Called by ConstraintManager. Used to call checker-specific
/// logic for handling assumptions on symbolic values.
- virtual const GRState* ProcessAssume(const GRState *state,
+ virtual const GRState* processAssume(const GRState *state,
SVal cond, bool assumption) = 0;
- /// WantsRegionChangeUpdate - Called by GRStateManager to determine if a
- /// region change should trigger a ProcessRegionChanges update.
- virtual bool WantsRegionChangeUpdate(const GRState* state) = 0;
+ /// wantsRegionChangeUpdate - Called by GRStateManager to determine if a
+ /// region change should trigger a processRegionChanges update.
+ virtual bool wantsRegionChangeUpdate(const GRState* state) = 0;
- /// ProcessRegionChanges - Called by GRStateManager whenever a change is made
+ /// processRegionChanges - Called by GRStateManager whenever a change is made
/// to the store. Used to update checkers that track region values.
- virtual const GRState* ProcessRegionChanges(const GRState* state,
+ virtual const GRState* processRegionChanges(const GRState* state,
const MemRegion* const *Begin,
const MemRegion* const *End) = 0;
- inline const GRState* ProcessRegionChange(const GRState* state,
+ inline const GRState* processRegionChange(const GRState* state,
const MemRegion* MR) {
- return ProcessRegionChanges(state, &MR, &MR+1);
+ return processRegionChanges(state, &MR, &MR+1);
}
/// Called by CoreEngine when the analysis worklist is either empty or the
// maximum number of analysis steps have been reached.
- virtual void ProcessEndWorklist(bool hasWorkRemaining) = 0;
+ virtual void processEndWorklist(bool hasWorkRemaining) = 0;
};
} // end GR namespace
Modified: cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/TransferFuncs.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/TransferFuncs.h?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/TransferFuncs.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/PathSensitive/TransferFuncs.h Mon Jan 10 20:34:45 2011
@@ -25,7 +25,7 @@
namespace ento {
class ExplodedNode;
class ExplodedNodeSet;
-class EndPathNodeBuilder;
+class EndOfFunctionNodeBuilder;
class ExprEngine;
class StmtNodeBuilder;
class StmtNodeBuilderRef;
@@ -61,7 +61,7 @@
// End-of-path and dead symbol notification.
virtual void evalEndPath(ExprEngine& Engine,
- EndPathNodeBuilder& Builder) {}
+ EndOfFunctionNodeBuilder& Builder) {}
virtual void evalDeadSymbols(ExplodedNodeSet& Dst,
Modified: cfe/trunk/lib/StaticAnalyzer/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/CFRefCount.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/CFRefCount.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/CFRefCount.cpp Mon Jan 10 20:34:45 2011
@@ -95,13 +95,13 @@
StmtNodeBuilder *SNB;
const Stmt *S;
const void *tag;
- EndPathNodeBuilder *ENB;
+ EndOfFunctionNodeBuilder *ENB;
public:
GenericNodeBuilder(StmtNodeBuilder &snb, const Stmt *s,
const void *t)
: SNB(&snb), S(s), tag(t), ENB(0) {}
- GenericNodeBuilder(EndPathNodeBuilder &enb)
+ GenericNodeBuilder(EndOfFunctionNodeBuilder &enb)
: SNB(0), S(0), tag(0), ENB(&enb) {}
ExplodedNode *MakeNode(const GRState *state, ExplodedNode *Pred) {
@@ -1718,7 +1718,7 @@
// End-of-path.
virtual void evalEndPath(ExprEngine& Engine,
- EndPathNodeBuilder& Builder);
+ EndOfFunctionNodeBuilder& Builder);
virtual void evalDeadSymbols(ExplodedNodeSet& Dst,
ExprEngine& Engine,
@@ -3250,7 +3250,7 @@
}
void CFRefCount::evalEndPath(ExprEngine& Eng,
- EndPathNodeBuilder& Builder) {
+ EndOfFunctionNodeBuilder& Builder) {
const GRState *state = Builder.getState();
GenericNodeBuilder Bd(Builder);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp Mon Jan 10 20:34:45 2011
@@ -34,7 +34,7 @@
void PreVisitDeclStmt(CheckerContext &C, const DeclStmt *DS);
void MarkLiveSymbols(const GRState *state, SymbolReaper &SR);
void evalDeadSymbols(CheckerContext &C, SymbolReaper &SR);
- bool WantsRegionChangeUpdate(const GRState *state);
+ bool wantsRegionChangeUpdate(const GRState *state);
const GRState *EvalRegionChanges(const GRState *state,
const MemRegion * const *Begin,
@@ -957,7 +957,7 @@
C.addTransition(state);
}
-bool CStringChecker::WantsRegionChangeUpdate(const GRState *state) {
+bool CStringChecker::wantsRegionChangeUpdate(const GRState *state) {
CStringLength::EntryMap Entries = state->get<CStringLength>();
return !Entries.isEmpty();
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ExprEngine.cpp Mon Jan 10 20:34:45 2011
@@ -384,7 +384,7 @@
/// evalAssume - Called by ConstraintManager. Used to call checker-specific
/// logic for handling assumptions on symbolic values.
-const GRState *ExprEngine::ProcessAssume(const GRState *state, SVal cond,
+const GRState *ExprEngine::processAssume(const GRState *state, SVal cond,
bool assumption) {
// Determine if we already have a cached 'CheckersOrdered' vector
// specifically tailored for processing assumptions. This
@@ -392,7 +392,7 @@
CheckersOrdered *CO = &Checkers;
llvm::OwningPtr<CheckersOrdered> NewCO;
- CallbackTag K = GetCallbackTag(ProcessAssumeCallback);
+ CallbackTag K = GetCallbackTag(processAssumeCallback);
CheckersOrdered *& CO_Ref = COCache[K];
if (!CO_Ref) {
@@ -439,7 +439,7 @@
return TF->evalAssume(state, cond, assumption);
}
-bool ExprEngine::WantsRegionChangeUpdate(const GRState* state) {
+bool ExprEngine::wantsRegionChangeUpdate(const GRState* state) {
CallbackTag K = GetCallbackTag(EvalRegionChangesCallback);
CheckersOrdered *CO = COCache[K];
@@ -448,7 +448,7 @@
for (CheckersOrdered::iterator I = CO->begin(), E = CO->end(); I != E; ++I) {
Checker *C = I->second;
- if (C->WantsRegionChangeUpdate(state))
+ if (C->wantsRegionChangeUpdate(state))
return true;
}
@@ -456,10 +456,10 @@
}
const GRState *
-ExprEngine::ProcessRegionChanges(const GRState *state,
+ExprEngine::processRegionChanges(const GRState *state,
const MemRegion * const *Begin,
const MemRegion * const *End) {
- // FIXME: Most of this method is copy-pasted from ProcessAssume.
+ // FIXME: Most of this method is copy-pasted from processAssume.
// Determine if we already have a cached 'CheckersOrdered' vector
// specifically tailored for processing region changes. This
@@ -508,14 +508,14 @@
return state;
}
-void ExprEngine::ProcessEndWorklist(bool hasWorkRemaining) {
+void ExprEngine::processEndWorklist(bool hasWorkRemaining) {
for (CheckersOrdered::iterator I = Checkers.begin(), E = Checkers.end();
I != E; ++I) {
I->second->VisitEndAnalysis(G, BR, *this);
}
}
-void ExprEngine::ProcessElement(const CFGElement E,
+void ExprEngine::processCFGElement(const CFGElement E,
StmtNodeBuilder& builder) {
switch (E.getKind()) {
case CFGElement::Statement:
@@ -1077,7 +1077,7 @@
// Block entrance. (Update counters).
//===----------------------------------------------------------------------===//
-bool ExprEngine::ProcessBlockEntrance(const CFGBlock* B,
+bool ExprEngine::processCFGBlockEntrance(const CFGBlock* B,
const ExplodedNode *Pred,
BlockCounter BC) {
return BC.getNumVisited(Pred->getLocationContext()->getCurrentStackFrame(),
@@ -1195,7 +1195,7 @@
return state->getSVal(Ex);
}
-void ExprEngine::ProcessBranch(const Stmt* Condition, const Stmt* Term,
+void ExprEngine::processBranch(const Stmt* Condition, const Stmt* Term,
BranchNodeBuilder& builder) {
// Check for NULL conditions; e.g. "for(;;)"
@@ -1265,9 +1265,9 @@
}
}
-/// ProcessIndirectGoto - Called by CoreEngine. Used to generate successor
+/// processIndirectGoto - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a computed goto jump.
-void ExprEngine::ProcessIndirectGoto(IndirectGotoNodeBuilder& builder) {
+void ExprEngine::processIndirectGoto(IndirectGotoNodeBuilder& builder) {
const GRState *state = builder.getState();
SVal V = state->getSVal(builder.getTarget());
@@ -1333,7 +1333,7 @@
/// ProcessEndPath - Called by CoreEngine. Used to generate end-of-path
/// nodes when the control reaches the end of a function.
-void ExprEngine::ProcessEndPath(EndPathNodeBuilder& builder) {
+void ExprEngine::processEndOfFunction(EndOfFunctionNodeBuilder& builder) {
getTF().evalEndPath(*this, builder);
StateMgr.EndPath(builder.getState());
for (CheckersOrdered::iterator I=Checkers.begin(),E=Checkers.end(); I!=E;++I){
@@ -1345,7 +1345,7 @@
/// ProcessSwitch - Called by CoreEngine. Used to generate successor
/// nodes by processing the 'effects' of a switch statement.
-void ExprEngine::ProcessSwitch(SwitchNodeBuilder& builder) {
+void ExprEngine::processSwitch(SwitchNodeBuilder& builder) {
typedef SwitchNodeBuilder::iterator iterator;
const GRState* state = builder.getState();
const Expr* CondE = builder.getCondition();
@@ -1454,12 +1454,12 @@
builder.generateDefaultCaseNode(DefaultSt);
}
-void ExprEngine::ProcessCallEnter(CallEnterNodeBuilder &B) {
+void ExprEngine::processCallEnter(CallEnterNodeBuilder &B) {
const GRState *state = B.getState()->EnterStackFrame(B.getCalleeContext());
B.generateNode(state);
}
-void ExprEngine::ProcessCallExit(CallExitNodeBuilder &B) {
+void ExprEngine::processCallExit(CallExitNodeBuilder &B) {
const GRState *state = B.getState();
const ExplodedNode *Pred = B.getPredecessor();
const StackFrameContext *calleeCtx =
@@ -3064,7 +3064,7 @@
ExplodedNodeSet Src;
if (const Expr *RetE = RS->getRetValue()) {
// Record the returned expression in the state. It will be used in
- // ProcessCallExit to bind the return value to the call expr.
+ // processCallExit to bind the return value to the call expr.
{
static int Tag = 0;
SaveAndRestore<const void *> OldTag(Builder->Tag, &Tag);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Mon Jan 10 20:34:45 2011
@@ -78,7 +78,7 @@
static void *getTag();
bool evalCallExpr(CheckerContext &C, const CallExpr *CE);
void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper);
- void evalEndPath(EndPathNodeBuilder &B, void *tag, ExprEngine &Eng);
+ void evalEndPath(EndOfFunctionNodeBuilder &B, void *tag, ExprEngine &Eng);
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S);
const GRState *evalAssume(const GRState *state, SVal Cond, bool Assumption,
bool *respondsToCallback);
@@ -593,7 +593,7 @@
C.generateNode(state->set<RegionState>(RS));
}
-void MallocChecker::evalEndPath(EndPathNodeBuilder &B, void *tag,
+void MallocChecker::evalEndPath(EndOfFunctionNodeBuilder &B, void *tag,
ExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp Mon Jan 10 20:34:45 2011
@@ -33,7 +33,7 @@
return &x;
}
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *RS);
- void evalEndPath(EndPathNodeBuilder &B, void *tag, ExprEngine &Eng);
+ void evalEndPath(EndOfFunctionNodeBuilder &B, void *tag, ExprEngine &Eng);
private:
void EmitStackError(CheckerContext &C, const MemRegion *R, const Expr *RetE);
SourceRange GenName(llvm::raw_ostream &os, const MemRegion *R,
@@ -130,7 +130,7 @@
}
}
-void StackAddrLeakChecker::evalEndPath(EndPathNodeBuilder &B, void *tag,
+void StackAddrLeakChecker::evalEndPath(EndOfFunctionNodeBuilder &B, void *tag,
ExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp Mon Jan 10 20:34:45 2011
@@ -75,7 +75,7 @@
virtual bool evalCallExpr(CheckerContext &C, const CallExpr *CE);
void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper);
- void evalEndPath(EndPathNodeBuilder &B, void *tag, ExprEngine &Eng);
+ void evalEndPath(EndOfFunctionNodeBuilder &B, void *tag, ExprEngine &Eng);
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S);
private:
@@ -421,7 +421,7 @@
}
}
-void StreamChecker::evalEndPath(EndPathNodeBuilder &B, void *tag,
+void StreamChecker::evalEndPath(EndOfFunctionNodeBuilder &B, void *tag,
ExprEngine &Eng) {
SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
const GRState *state = B.getState();
Modified: cfe/trunk/lib/StaticAnalyzer/CoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/CoreEngine.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/CoreEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/CoreEngine.cpp Mon Jan 10 20:34:45 2011
@@ -243,7 +243,7 @@
}
}
- SubEng.ProcessEndWorklist(hasWorkRemaining());
+ SubEng.processEndWorklist(hasWorkRemaining());
return WList->hasWork();
}
@@ -262,12 +262,12 @@
unsigned Index, ExplodedNode *Pred) {
CallEnterNodeBuilder Builder(*this, Pred, L.getCallExpr(),
L.getCalleeContext(), Block, Index);
- ProcessCallEnter(Builder);
+ processCallEnter(Builder);
}
void CoreEngine::HandleCallExit(const CallExit &L, ExplodedNode *Pred) {
CallExitNodeBuilder Builder(*this, Pred);
- ProcessCallExit(Builder);
+ processCallExit(Builder);
}
void CoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
@@ -281,16 +281,16 @@
&& "EXIT block cannot contain Stmts.");
// Process the final state transition.
- EndPathNodeBuilder Builder(Blk, Pred, this);
- ProcessEndPath(Builder);
+ EndOfFunctionNodeBuilder Builder(Blk, Pred, this);
+ processEndOfFunction(Builder);
// This path is done. Don't enqueue any more nodes.
return;
}
- // FIXME: Should we allow ProcessBlockEntrance to also manipulate state?
+ // FIXME: Should we allow processCFGBlockEntrance to also manipulate state?
- if (ProcessBlockEntrance(Blk, Pred, WList->getBlockCounter()))
+ if (processCFGBlockEntrance(Blk, Pred, WList->getBlockCounter()))
generateNode(BlockEntrance(Blk, Pred->getLocationContext()),
Pred->State, Pred);
else {
@@ -312,7 +312,7 @@
if (CFGElement E = L.getFirstElement()) {
StmtNodeBuilder Builder(L.getBlock(), 0, Pred, this,
SubEng.getStateManager());
- ProcessElement(E, Builder);
+ processCFGElement(E, Builder);
}
else
HandleBlockExit(L.getBlock(), Pred);
@@ -366,7 +366,7 @@
builder(Pred, B, cast<IndirectGotoStmt>(Term)->getTarget(),
*(B->succ_begin()), this);
- ProcessIndirectGoto(builder);
+ processIndirectGoto(builder);
return;
}
@@ -389,7 +389,7 @@
SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(),
this);
- ProcessSwitch(builder);
+ processSwitch(builder);
return;
}
@@ -413,7 +413,7 @@
BranchNodeBuilder Builder(B, *(B->succ_begin()), *(B->succ_begin()+1),
Pred, this);
- ProcessBranch(Cond, Term, Builder);
+ processBranch(Cond, Term, Builder);
}
void CoreEngine::HandlePostStmt(const CFGBlock* B, unsigned StmtIdx,
@@ -425,7 +425,7 @@
else {
StmtNodeBuilder Builder(B, StmtIdx, Pred, this,
SubEng.getStateManager());
- ProcessElement((*B)[StmtIdx], Builder);
+ processCFGElement((*B)[StmtIdx], Builder);
}
}
@@ -669,7 +669,7 @@
return NULL;
}
-EndPathNodeBuilder::~EndPathNodeBuilder() {
+EndOfFunctionNodeBuilder::~EndOfFunctionNodeBuilder() {
// Auto-generate an EOP node if one has not been generated.
if (!HasGeneratedNode) {
// If we are in an inlined call, generate CallExit node.
@@ -681,7 +681,7 @@
}
ExplodedNode*
-EndPathNodeBuilder::generateNode(const GRState* State, const void *tag,
+EndOfFunctionNodeBuilder::generateNode(const GRState* State, const void *tag,
ExplodedNode* P) {
HasGeneratedNode = true;
bool IsNew;
@@ -699,7 +699,7 @@
return NULL;
}
-void EndPathNodeBuilder::GenerateCallExitNode(const GRState *state) {
+void EndOfFunctionNodeBuilder::GenerateCallExitNode(const GRState *state) {
HasGeneratedNode = true;
// Create a CallExit node and enqueue it.
const StackFrameContext *LocCtx
Modified: cfe/trunk/lib/StaticAnalyzer/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/GRState.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/GRState.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/GRState.cpp Mon Jan 10 20:34:45 2011
@@ -95,7 +95,7 @@
const MemRegion *MR = LV.getAsRegion();
if (MR)
- return Mgr.getOwningEngine().ProcessRegionChange(new_state, MR);
+ return Mgr.getOwningEngine().processRegionChange(new_state, MR);
return new_state;
}
@@ -105,7 +105,7 @@
const MemRegion *R = cast<loc::MemRegionVal>(loc).getRegion();
Store new_store = Mgr.StoreMgr->BindDefault(St, R, V);
const GRState *new_state = makeWithStore(new_store);
- return Mgr.getOwningEngine().ProcessRegionChange(new_state, R);
+ return Mgr.getOwningEngine().processRegionChange(new_state, R);
}
const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin,
@@ -116,7 +116,7 @@
GRStateManager &Mgr = getStateManager();
SubEngine &Eng = Mgr.getOwningEngine();
- if (Eng.WantsRegionChangeUpdate(this)) {
+ if (Eng.wantsRegionChangeUpdate(this)) {
StoreManager::InvalidatedRegions Regions;
Store new_store = Mgr.StoreMgr->InvalidateRegions(St, Begin, End,
@@ -125,7 +125,7 @@
&Regions);
const GRState *new_state = makeWithStore(new_store);
- return Eng.ProcessRegionChanges(new_state,
+ return Eng.processRegionChanges(new_state,
&Regions.front(),
&Regions.back()+1);
}
Modified: cfe/trunk/lib/StaticAnalyzer/SimpleConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/SimpleConstraintManager.cpp?rev=123211&r1=123210&r2=123211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/SimpleConstraintManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/SimpleConstraintManager.cpp Mon Jan 10 20:34:45 2011
@@ -69,7 +69,7 @@
const GRState *SimpleConstraintManager::assume(const GRState *state, Loc cond,
bool assumption) {
state = assumeAux(state, cond, assumption);
- return SU.ProcessAssume(state, cond, assumption);
+ return SU.processAssume(state, cond, assumption);
}
const GRState *SimpleConstraintManager::assumeAux(const GRState *state,
@@ -118,7 +118,7 @@
NonLoc cond,
bool assumption) {
state = assumeAux(state, cond, assumption);
- return SU.ProcessAssume(state, cond, assumption);
+ return SU.processAssume(state, cond, assumption);
}
static BinaryOperator::Opcode NegateComparison(BinaryOperator::Opcode op) {
More information about the cfe-commits
mailing list