diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-12-01 21:57:22 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-12-01 21:57:22 +0000 |
commit | 9c14953d0c84f7cf5adfb4cd3c0f05a9b1723c1c (patch) | |
tree | 32461fb8d343d93a3058f24e389ccf623dc938f5 /include/clang/Checker | |
parent | da80f74d8a3f9a78a48d5fdc2d26eb125b70e0d7 (diff) |
Rename all 'EvalXXX' methods in libChecker to
'evalXXX'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Checker')
-rw-r--r-- | include/clang/Checker/PathSensitive/BasicValueFactory.h | 2 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/Checker.h | 22 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/GRExprEngine.h | 50 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/GRTransferFuncs.h | 14 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/SValBuilder.h | 22 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/SVals.h | 2 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/Store.h | 4 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/SymbolManager.h | 2 |
8 files changed, 59 insertions, 59 deletions
diff --git a/include/clang/Checker/PathSensitive/BasicValueFactory.h b/include/clang/Checker/PathSensitive/BasicValueFactory.h index a64148aa07..c9518cc5ed 100644 --- a/include/clang/Checker/PathSensitive/BasicValueFactory.h +++ b/include/clang/Checker/PathSensitive/BasicValueFactory.h @@ -179,7 +179,7 @@ public: return SValListFactory.add(X, L); } - const llvm::APSInt* EvaluateAPSInt(BinaryOperator::Opcode Op, + const llvm::APSInt* evalAPSInt(BinaryOperator::Opcode Op, const llvm::APSInt& V1, const llvm::APSInt& V2); diff --git a/include/clang/Checker/PathSensitive/Checker.h b/include/clang/Checker/PathSensitive/Checker.h index 6ea5b77163..73ce782b2d 100644 --- a/include/clang/Checker/PathSensitive/Checker.h +++ b/include/clang/Checker/PathSensitive/Checker.h @@ -207,20 +207,20 @@ private: _PostVisit(C, S); } - bool GR_EvalNilReceiver(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, + bool GR_evalNilReceiver(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, GRExprEngine &Eng, const ObjCMessageExpr *ME, ExplodedNode *Pred, const GRState *state, void *tag) { CheckerContext C(Dst, Builder, Eng, Pred, tag, ProgramPoint::PostStmtKind, 0, ME, state); - return EvalNilReceiver(C, ME); + return evalNilReceiver(C, ME); } - bool GR_EvalCallExpr(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, + bool GR_evalCallExpr(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, GRExprEngine &Eng, const CallExpr *CE, ExplodedNode *Pred, void *tag) { CheckerContext C(Dst, Builder, Eng, Pred, tag, ProgramPoint::PostStmtKind, 0, CE); - return EvalCallExpr(C, CE); + return evalCallExpr(C, CE); } // FIXME: Remove the 'tag' option. @@ -250,12 +250,12 @@ private: VisitLocation(C, S, location); } - void GR_EvalDeadSymbols(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, + void GR_evalDeadSymbols(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder, GRExprEngine &Eng, const Stmt *S, ExplodedNode *Pred, SymbolReaper &SymReaper, void *tag) { CheckerContext C(Dst, Builder, Eng, Pred, tag, ProgramPoint::PostPurgeDeadSymbolsKind, 0, S); - EvalDeadSymbols(C, SymReaper); + evalDeadSymbols(C, SymReaper); } public: @@ -265,8 +265,8 @@ public: virtual void VisitLocation(CheckerContext &C, const Stmt *S, SVal location) {} virtual void PreVisitBind(CheckerContext &C, const Stmt *StoreE, SVal location, SVal val) {} - virtual void EvalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper) {} - virtual void EvalEndPath(GREndPathNodeBuilder &B, void *tag, + virtual void evalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper) {} + virtual void evalEndPath(GREndPathNodeBuilder &B, void *tag, GRExprEngine &Eng) {} virtual void MarkLiveSymbols(const GRState *state, SymbolReaper &SymReaper) {} @@ -275,15 +275,15 @@ public: GRExprEngine &Eng, const Stmt *Condition, void *tag) {} - virtual bool EvalNilReceiver(CheckerContext &C, const ObjCMessageExpr *ME) { + virtual bool evalNilReceiver(CheckerContext &C, const ObjCMessageExpr *ME) { return false; } - virtual bool EvalCallExpr(CheckerContext &C, const CallExpr *CE) { + virtual bool evalCallExpr(CheckerContext &C, const CallExpr *CE) { return false; } - virtual const GRState *EvalAssume(const GRState *state, SVal Cond, + virtual const GRState *evalAssume(const GRState *state, SVal Cond, bool Assumption, bool *respondsToCallback) { *respondsToCallback = false; return state; diff --git a/include/clang/Checker/PathSensitive/GRExprEngine.h b/include/clang/Checker/PathSensitive/GRExprEngine.h index 69a81ef1b6..08fdd06e33 100644 --- a/include/clang/Checker/PathSensitive/GRExprEngine.h +++ b/include/clang/Checker/PathSensitive/GRExprEngine.h @@ -224,7 +224,7 @@ public: /// Called by GRCoreEngine when the analysis worklist has terminated. void ProcessEndWorklist(bool hasWorkRemaining); - /// EvalAssume - Callback function invoked by the ConstraintManager when + /// evalAssume - Callback function invoked by the ConstraintManager when /// making assumptions about state values. const GRState *ProcessAssume(const GRState *state, SVal cond,bool assumption); @@ -303,7 +303,7 @@ public: /// other functions that handle specific kinds of statements. void Visit(const Stmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst); - /// VisitLValue - Evaluate the lvalue of the expression. For example, if Ex is + /// VisitLValue - evaluate the lvalue of the expression. For example, if Ex is /// a DeclRefExpr, it evaluates to the MemRegionVal which represents its /// storage location. Note that not all kinds of expressions has lvalue. void VisitLValue(const Expr* Ex, ExplodedNode* Pred, ExplodedNodeSet& Dst); @@ -466,61 +466,61 @@ public: const StackFrameContext *frameCtx); /// Evaluate arguments with a work list algorithm. - void EvalArguments(ConstExprIterator AI, ConstExprIterator AE, + void evalArguments(ConstExprIterator AI, ConstExprIterator AE, const FunctionProtoType *FnType, ExplodedNode *Pred, ExplodedNodeSet &Dst, bool FstArgAsLValue = false); /// Evaluate method call itself. Used for CXXMethodCallExpr and /// CXXOperatorCallExpr. - void EvalMethodCall(const CallExpr *MCE, const CXXMethodDecl *MD, + void evalMethodCall(const CallExpr *MCE, const CXXMethodDecl *MD, const Expr *ThisExpr, ExplodedNode *Pred, ExplodedNodeSet &Src, ExplodedNodeSet &Dst); - /// EvalEagerlyAssume - Given the nodes in 'Src', eagerly assume symbolic + /// evalEagerlyAssume - Given the nodes in 'Src', eagerly assume symbolic /// expressions of the form 'x != 0' and generate new nodes (stored in Dst) /// with those assumptions. - void EvalEagerlyAssume(ExplodedNodeSet& Dst, ExplodedNodeSet& Src, + void evalEagerlyAssume(ExplodedNodeSet& Dst, ExplodedNodeSet& Src, const Expr *Ex); - SVal EvalMinus(SVal X) { - return X.isValid() ? svalBuilder.EvalMinus(cast<NonLoc>(X)) : X; + SVal evalMinus(SVal X) { + return X.isValid() ? svalBuilder.evalMinus(cast<NonLoc>(X)) : X; } - SVal EvalComplement(SVal X) { - return X.isValid() ? svalBuilder.EvalComplement(cast<NonLoc>(X)) : X; + SVal evalComplement(SVal X) { + return X.isValid() ? svalBuilder.evalComplement(cast<NonLoc>(X)) : X; } public: - SVal EvalBinOp(const GRState *state, BinaryOperator::Opcode op, + SVal evalBinOp(const GRState *state, BinaryOperator::Opcode op, NonLoc L, NonLoc R, QualType T) { - return svalBuilder.EvalBinOpNN(state, op, L, R, T); + return svalBuilder.evalBinOpNN(state, op, L, R, T); } - SVal EvalBinOp(const GRState *state, BinaryOperator::Opcode op, + SVal evalBinOp(const GRState *state, BinaryOperator::Opcode op, NonLoc L, SVal R, QualType T) { - return R.isValid() ? svalBuilder.EvalBinOpNN(state,op,L, cast<NonLoc>(R), T) : R; + return R.isValid() ? svalBuilder.evalBinOpNN(state,op,L, cast<NonLoc>(R), T) : R; } - SVal EvalBinOp(const GRState *ST, BinaryOperator::Opcode Op, + SVal evalBinOp(const GRState *ST, BinaryOperator::Opcode Op, SVal LHS, SVal RHS, QualType T) { - return svalBuilder.EvalBinOp(ST, Op, LHS, RHS, T); + return svalBuilder.evalBinOp(ST, Op, LHS, RHS, T); } protected: - void EvalObjCMessageExpr(ExplodedNodeSet& Dst, const ObjCMessageExpr* ME, + void evalObjCMessageExpr(ExplodedNodeSet& Dst, const ObjCMessageExpr* ME, ExplodedNode* Pred, const GRState *state) { assert (Builder && "GRStmtNodeBuilder must be defined."); - getTF().EvalObjCMessageExpr(Dst, *this, *Builder, ME, Pred, state); + getTF().evalObjCMessageExpr(Dst, *this, *Builder, ME, Pred, state); } const GRState* MarkBranch(const GRState* St, const Stmt* Terminator, bool branchTaken); - /// EvalBind - Handle the semantics of binding a value to a specific location. - /// This method is used by EvalStore, VisitDeclStmt, and others. - void EvalBind(ExplodedNodeSet& Dst, const Stmt* StoreE, ExplodedNode* Pred, + /// evalBind - Handle the semantics of binding a value to a specific location. + /// This method is used by evalStore, VisitDeclStmt, and others. + void evalBind(ExplodedNodeSet& Dst, const Stmt* StoreE, ExplodedNode* Pred, const GRState* St, SVal location, SVal Val, bool atDeclInit = false); @@ -531,23 +531,23 @@ public: // be the same as Pred->state, and when 'location' may not be the // same as state->getLValue(Ex). /// Simulate a read of the result of Ex. - void EvalLoad(ExplodedNodeSet& Dst, const Expr* Ex, ExplodedNode* Pred, + void evalLoad(ExplodedNodeSet& Dst, const Expr* Ex, ExplodedNode* Pred, const GRState* St, SVal location, const void *tag = 0, QualType LoadTy = QualType()); // FIXME: 'tag' should be removed, and a LocationContext should be used // instead. - void EvalStore(ExplodedNodeSet& Dst, const Expr* AssignE, const Expr* StoreE, + void evalStore(ExplodedNodeSet& Dst, const Expr* AssignE, const Expr* StoreE, ExplodedNode* Pred, const GRState* St, SVal TargetLV, SVal Val, const void *tag = 0); private: - void EvalLoadCommon(ExplodedNodeSet& Dst, const Expr* Ex, ExplodedNode* Pred, + void evalLoadCommon(ExplodedNodeSet& Dst, const Expr* Ex, ExplodedNode* Pred, const GRState* St, SVal location, const void *tag, QualType LoadTy); // FIXME: 'tag' should be removed, and a LocationContext should be used // instead. - void EvalLocation(ExplodedNodeSet &Dst, const Stmt *S, ExplodedNode* Pred, + void evalLocation(ExplodedNodeSet &Dst, const Stmt *S, ExplodedNode* Pred, const GRState* St, SVal location, const void *tag, bool isLoad); diff --git a/include/clang/Checker/PathSensitive/GRTransferFuncs.h b/include/clang/Checker/PathSensitive/GRTransferFuncs.h index 320b7f7b8a..a6a79cf91d 100644 --- a/include/clang/Checker/PathSensitive/GRTransferFuncs.h +++ b/include/clang/Checker/PathSensitive/GRTransferFuncs.h @@ -39,13 +39,13 @@ public: // Calls. - virtual void EvalCall(ExplodedNodeSet& Dst, + virtual void evalCall(ExplodedNodeSet& Dst, GRExprEngine& Engine, GRStmtNodeBuilder& Builder, const CallExpr* CE, SVal L, ExplodedNode* Pred) {} - virtual void EvalObjCMessageExpr(ExplodedNodeSet& Dst, + virtual void evalObjCMessageExpr(ExplodedNodeSet& Dst, GRExprEngine& Engine, GRStmtNodeBuilder& Builder, const ObjCMessageExpr* ME, @@ -54,15 +54,15 @@ public: // Stores. - virtual void EvalBind(GRStmtNodeBuilderRef& B, SVal location, SVal val) {} + virtual void evalBind(GRStmtNodeBuilderRef& B, SVal location, SVal val) {} // End-of-path and dead symbol notification. - virtual void EvalEndPath(GRExprEngine& Engine, + virtual void evalEndPath(GRExprEngine& Engine, GREndPathNodeBuilder& Builder) {} - virtual void EvalDeadSymbols(ExplodedNodeSet& Dst, + virtual void evalDeadSymbols(ExplodedNodeSet& Dst, GRExprEngine& Engine, GRStmtNodeBuilder& Builder, ExplodedNode* Pred, @@ -70,14 +70,14 @@ public: SymbolReaper& SymReaper) {} // Return statements. - virtual void EvalReturn(ExplodedNodeSet& Dst, + virtual void evalReturn(ExplodedNodeSet& Dst, GRExprEngine& Engine, GRStmtNodeBuilder& Builder, const ReturnStmt* S, ExplodedNode* Pred) {} // Assumptions. - virtual const GRState* EvalAssume(const GRState *state, + virtual const GRState* evalAssume(const GRState *state, SVal Cond, bool Assumption) { return state; } diff --git a/include/clang/Checker/PathSensitive/SValBuilder.h b/include/clang/Checker/PathSensitive/SValBuilder.h index 22e0cc683c..09ce4a472c 100644 --- a/include/clang/Checker/PathSensitive/SValBuilder.h +++ b/include/clang/Checker/PathSensitive/SValBuilder.h @@ -31,36 +31,36 @@ protected: public: // FIXME: Make these protected again one RegionStoreManager correctly // handles loads from differening bound value types. - virtual SVal EvalCastNL(NonLoc val, QualType castTy) = 0; - virtual SVal EvalCastL(Loc val, QualType castTy) = 0; + virtual SVal evalCastNL(NonLoc val, QualType castTy) = 0; + virtual SVal evalCastL(Loc val, QualType castTy) = 0; public: SValBuilder(ValueManager &valMgr) : ValMgr(valMgr) {} virtual ~SValBuilder() {} - SVal EvalCast(SVal V, QualType castTy, QualType originalType); + SVal evalCast(SVal V, QualType castTy, QualType originalType); - virtual SVal EvalMinus(NonLoc val) = 0; + virtual SVal evalMinus(NonLoc val) = 0; - virtual SVal EvalComplement(NonLoc val) = 0; + virtual SVal evalComplement(NonLoc val) = 0; - virtual SVal EvalBinOpNN(const GRState *state, BinaryOperator::Opcode Op, + virtual SVal evalBinOpNN(const GRState *state, BinaryOperator::Opcode Op, NonLoc lhs, NonLoc rhs, QualType resultTy) = 0; - virtual SVal EvalBinOpLL(const GRState *state, BinaryOperator::Opcode Op, + virtual SVal evalBinOpLL(const GRState *state, BinaryOperator::Opcode Op, Loc lhs, Loc rhs, QualType resultTy) = 0; - virtual SVal EvalBinOpLN(const GRState *state, BinaryOperator::Opcode Op, + virtual SVal evalBinOpLN(const GRState *state, BinaryOperator::Opcode Op, Loc lhs, NonLoc rhs, QualType resultTy) = 0; - /// getKnownValue - Evaluates a given SVal. If the SVal has only one possible + /// getKnownValue - evaluates a given SVal. If the SVal has only one possible /// (integer) value, that value is returned. Otherwise, returns NULL. virtual const llvm::APSInt *getKnownValue(const GRState *state, SVal V) = 0; - SVal EvalBinOp(const GRState *ST, BinaryOperator::Opcode Op, + SVal evalBinOp(const GRState *ST, BinaryOperator::Opcode Op, SVal L, SVal R, QualType T); - DefinedOrUnknownSVal EvalEQ(const GRState *ST, DefinedOrUnknownSVal L, + DefinedOrUnknownSVal evalEQ(const GRState *ST, DefinedOrUnknownSVal L, DefinedOrUnknownSVal R); }; diff --git a/include/clang/Checker/PathSensitive/SVals.h b/include/clang/Checker/PathSensitive/SVals.h index 82a1b950b6..385814a948 100644 --- a/include/clang/Checker/PathSensitive/SVals.h +++ b/include/clang/Checker/PathSensitive/SVals.h @@ -489,7 +489,7 @@ public: } // Transfer functions for binary/unary operations on ConcreteInts. - SVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op, + SVal evalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op, const ConcreteInt& R) const; // Implement isa<T> support. diff --git a/include/clang/Checker/PathSensitive/Store.h b/include/clang/Checker/PathSensitive/Store.h index 44638ec236..c2e5436adb 100644 --- a/include/clang/Checker/PathSensitive/Store.h +++ b/include/clang/Checker/PathSensitive/Store.h @@ -152,8 +152,8 @@ public: const MemRegion *CastRegion(const MemRegion *region, QualType CastToTy); - /// EvalBinOp - Perform pointer arithmetic. - virtual SVal EvalBinOp(BinaryOperator::Opcode Op, + /// evalBinOp - Perform pointer arithmetic. + virtual SVal evalBinOp(BinaryOperator::Opcode Op, Loc lhs, NonLoc rhs, QualType resultTy) { return UnknownVal(); } diff --git a/include/clang/Checker/PathSensitive/SymbolManager.h b/include/clang/Checker/PathSensitive/SymbolManager.h index e6b1255a5b..948795b40f 100644 --- a/include/clang/Checker/PathSensitive/SymbolManager.h +++ b/include/clang/Checker/PathSensitive/SymbolManager.h @@ -458,7 +458,7 @@ public: /// isDead - Returns whether or not a symbol has been confirmed dead. This /// should only be called once all marking of dead symbols has completed. - /// (For checkers, this means only in the EvalDeadSymbols callback.) + /// (For checkers, this means only in the evalDeadSymbols callback.) bool isDead(SymbolRef sym) const { return TheDead.count(sym); } |