diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/StaticAnalyzer/CFRefCount.cpp | 8 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 34 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 4 | ||||
-rw-r--r-- | lib/StaticAnalyzer/CoreEngine.cpp | 30 | ||||
-rw-r--r-- | lib/StaticAnalyzer/GRState.cpp | 8 | ||||
-rw-r--r-- | lib/StaticAnalyzer/SimpleConstraintManager.cpp | 4 |
9 files changed, 50 insertions, 50 deletions
diff --git a/lib/StaticAnalyzer/CFRefCount.cpp b/lib/StaticAnalyzer/CFRefCount.cpp index 5fd223c471..6fda42cce7 100644 --- a/lib/StaticAnalyzer/CFRefCount.cpp +++ b/lib/StaticAnalyzer/CFRefCount.cpp @@ -95,13 +95,13 @@ class GenericNodeBuilder { 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 @@ public: // End-of-path. virtual void evalEndPath(ExprEngine& Engine, - EndPathNodeBuilder& Builder); + EndOfFunctionNodeBuilder& Builder); virtual void evalDeadSymbols(ExplodedNodeSet& Dst, ExprEngine& Engine, @@ -3250,7 +3250,7 @@ CFRefCount::ProcessLeaks(const GRState * state, } void CFRefCount::evalEndPath(ExprEngine& Eng, - EndPathNodeBuilder& Builder) { + EndOfFunctionNodeBuilder& Builder) { const GRState *state = Builder.getState(); GenericNodeBuilder Bd(Builder); diff --git a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp index b7513c39c1..e0b7e8a100 100644 --- a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp @@ -34,7 +34,7 @@ public: 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 @@ void CStringChecker::PreVisitDeclStmt(CheckerContext &C, const DeclStmt *DS) { C.addTransition(state); } -bool CStringChecker::WantsRegionChangeUpdate(const GRState *state) { +bool CStringChecker::wantsRegionChangeUpdate(const GRState *state) { CStringLength::EntryMap Entries = state->get<CStringLength>(); return !Entries.isEmpty(); } diff --git a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp index ca960142ee..5dd5d72a4c 100644 --- a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp @@ -384,7 +384,7 @@ const GRState* ExprEngine::getInitialState(const LocationContext *InitLoc) { /// 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 @@ const GRState *ExprEngine::ProcessAssume(const GRState *state, SVal cond, 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 @@ const GRState *ExprEngine::ProcessAssume(const GRState *state, SVal cond, 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 @@ bool ExprEngine::WantsRegionChangeUpdate(const GRState* state) { 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 @@ bool ExprEngine::WantsRegionChangeUpdate(const GRState* state) { } 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 @@ ExprEngine::ProcessRegionChanges(const GRState *state, 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 @@ void ExprEngine::Visit(const Stmt* S, ExplodedNode* Pred, // 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 @@ static SVal RecoverCastedSymbol(GRStateManager& StateMgr, const GRState* state, 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 @@ void ExprEngine::ProcessBranch(const Stmt* Condition, const Stmt* Term, } } -/// 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 @@ void ExprEngine::VisitGuardedExpr(const Expr* Ex, const Expr* L, /// 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 @@ void ExprEngine::ProcessEndPath(EndPathNodeBuilder& builder) { /// 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 @@ void ExprEngine::ProcessSwitch(SwitchNodeBuilder& builder) { 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 @@ void ExprEngine::VisitReturnStmt(const ReturnStmt *RS, ExplodedNode *Pred, 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); diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 42243cb525..9375947abb 100644 --- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -78,7 +78,7 @@ public: 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 @@ void MallocChecker::evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper) 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(); diff --git a/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp b/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp index 1ec5c32aff..f8afcee268 100644 --- a/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/StackAddrLeakChecker.cpp @@ -33,7 +33,7 @@ public: 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::PreVisitReturnStmt(CheckerContext &C, } } -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(); diff --git a/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/lib/StaticAnalyzer/Checkers/StreamChecker.cpp index a6d1e079c4..78fcbf6741 100644 --- a/lib/StaticAnalyzer/Checkers/StreamChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/StreamChecker.cpp @@ -75,7 +75,7 @@ public: 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::evalDeadSymbols(CheckerContext &C,SymbolReaper &SymReaper) { } } -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(); diff --git a/lib/StaticAnalyzer/CoreEngine.cpp b/lib/StaticAnalyzer/CoreEngine.cpp index a23c7f9d2d..47fc1edd8e 100644 --- a/lib/StaticAnalyzer/CoreEngine.cpp +++ b/lib/StaticAnalyzer/CoreEngine.cpp @@ -243,7 +243,7 @@ bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps, } } - SubEng.ProcessEndWorklist(hasWorkRemaining()); + SubEng.processEndWorklist(hasWorkRemaining()); return WList->hasWork(); } @@ -262,12 +262,12 @@ void CoreEngine::HandleCallEnter(const CallEnter &L, const CFGBlock *Block, 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 @@ void CoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) { && "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 @@ void CoreEngine::HandleBlockEntrance(const BlockEntrance& L, 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 @@ void CoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) { builder(Pred, B, cast<IndirectGotoStmt>(Term)->getTarget(), *(B->succ_begin()), this); - ProcessIndirectGoto(builder); + processIndirectGoto(builder); return; } @@ -389,7 +389,7 @@ void CoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode* Pred) { SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(), this); - ProcessSwitch(builder); + processSwitch(builder); return; } @@ -413,7 +413,7 @@ void CoreEngine::HandleBranch(const Stmt* Cond, const Stmt* Term, 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 @@ void CoreEngine::HandlePostStmt(const CFGBlock* B, unsigned StmtIdx, else { StmtNodeBuilder Builder(B, StmtIdx, Pred, this, SubEng.getStateManager()); - ProcessElement((*B)[StmtIdx], Builder); + processCFGElement((*B)[StmtIdx], Builder); } } @@ -669,7 +669,7 @@ SwitchNodeBuilder::generateDefaultCaseNode(const GRState* St, bool isSink) { 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 @@ EndPathNodeBuilder::~EndPathNodeBuilder() { } 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 @@ EndPathNodeBuilder::generateNode(const GRState* State, const void *tag, 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 diff --git a/lib/StaticAnalyzer/GRState.cpp b/lib/StaticAnalyzer/GRState.cpp index 12c8968367..55a2eb7eba 100644 --- a/lib/StaticAnalyzer/GRState.cpp +++ b/lib/StaticAnalyzer/GRState.cpp @@ -95,7 +95,7 @@ const GRState *GRState::bindLoc(Loc LV, SVal V) const { 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 GRState *GRState::bindDefault(SVal loc, SVal V) const { 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 @@ const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin, 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 @@ const GRState *GRState::InvalidateRegions(const MemRegion * const *Begin, &Regions); const GRState *new_state = makeWithStore(new_store); - return Eng.ProcessRegionChanges(new_state, + return Eng.processRegionChanges(new_state, &Regions.front(), &Regions.back()+1); } diff --git a/lib/StaticAnalyzer/SimpleConstraintManager.cpp b/lib/StaticAnalyzer/SimpleConstraintManager.cpp index e54d0ffe00..11bc5698a9 100644 --- a/lib/StaticAnalyzer/SimpleConstraintManager.cpp +++ b/lib/StaticAnalyzer/SimpleConstraintManager.cpp @@ -69,7 +69,7 @@ const GRState *SimpleConstraintManager::assume(const GRState *state, 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 @@ const GRState *SimpleConstraintManager::assume(const GRState *state, 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) { |