[cfe-commits] r122271 - in /cfe/trunk: include/clang/Checker/PathSensitive/Checker.h lib/Checker/ArrayBoundChecker.cpp lib/Checker/DereferenceChecker.cpp lib/Checker/GRExprEngine.cpp lib/Checker/MallocChecker.cpp
Ted Kremenek
kremenek at apple.com
Mon Dec 20 13:22:47 PST 2010
Author: kremenek
Date: Mon Dec 20 15:22:47 2010
New Revision: 122271
URL: http://llvm.org/viewvc/llvm-project?rev=122271&view=rev
Log:
Rename 'VisitLocation' to 'visitLocation'.
Modified:
cfe/trunk/include/clang/Checker/PathSensitive/Checker.h
cfe/trunk/lib/Checker/ArrayBoundChecker.cpp
cfe/trunk/lib/Checker/DereferenceChecker.cpp
cfe/trunk/lib/Checker/GRExprEngine.cpp
cfe/trunk/lib/Checker/MallocChecker.cpp
Modified: cfe/trunk/include/clang/Checker/PathSensitive/Checker.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/Checker.h?rev=122271&r1=122270&r2=122271&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/Checker.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/Checker.h Mon Dec 20 15:22:47 2010
@@ -233,7 +233,7 @@
}
// FIXME: Remove the 'tag' option.
- void GR_VisitLocation(ExplodedNodeSet &Dst,
+ void GR_visitLocation(ExplodedNodeSet &Dst,
GRStmtNodeBuilder &Builder,
GRExprEngine &Eng,
const Stmt *S,
@@ -243,7 +243,7 @@
CheckerContext C(Dst, Builder, Eng, Pred, tag,
isLoad ? ProgramPoint::PreLoadKind :
ProgramPoint::PreStoreKind, 0, S, state);
- VisitLocation(C, S, location);
+ visitLocation(C, S, location);
}
void GR_evalDeadSymbols(ExplodedNodeSet &Dst, GRStmtNodeBuilder &Builder,
@@ -258,7 +258,7 @@
virtual ~Checker();
virtual void _PreVisit(CheckerContext &C, const Stmt *S) {}
virtual void _PostVisit(CheckerContext &C, const Stmt *S) {}
- virtual void VisitLocation(CheckerContext &C, const Stmt *S, SVal location) {}
+ 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) {}
Modified: cfe/trunk/lib/Checker/ArrayBoundChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/ArrayBoundChecker.cpp?rev=122271&r1=122270&r2=122271&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/ArrayBoundChecker.cpp (original)
+++ cfe/trunk/lib/Checker/ArrayBoundChecker.cpp Mon Dec 20 15:22:47 2010
@@ -24,9 +24,9 @@
public CheckerVisitor<ArrayBoundChecker> {
BuiltinBug *BT;
public:
- ArrayBoundChecker() : BT(0) {}
- static void *getTag();
- void VisitLocation(CheckerContext &C, const Stmt *S, SVal l);
+ ArrayBoundChecker() : BT(0) {}
+ static void *getTag() { static int x = 0; return &x; }
+ void visitLocation(CheckerContext &C, const Stmt *S, SVal l);
};
}
@@ -34,11 +34,7 @@
Eng.registerCheck(new ArrayBoundChecker());
}
-void *ArrayBoundChecker::getTag() {
- static int x = 0; return &x;
-}
-
-void ArrayBoundChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l){
+void ArrayBoundChecker::visitLocation(CheckerContext &C, const Stmt *S, SVal l){
// Check for out of bound array element access.
const MemRegion *R = l.getAsRegion();
if (!R)
Modified: cfe/trunk/lib/Checker/DereferenceChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/DereferenceChecker.cpp?rev=122271&r1=122270&r2=122271&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/DereferenceChecker.cpp (original)
+++ cfe/trunk/lib/Checker/DereferenceChecker.cpp Mon Dec 20 15:22:47 2010
@@ -28,7 +28,7 @@
public:
DereferenceChecker() : BT_null(0), BT_undef(0) {}
static void *getTag() { static int tag = 0; return &tag; }
- void VisitLocation(CheckerContext &C, const Stmt *S, SVal location);
+ void visitLocation(CheckerContext &C, const Stmt *S, SVal location);
std::pair<ExplodedNode * const*, ExplodedNode * const*>
getImplicitNodes() const {
@@ -83,7 +83,7 @@
}
}
-void DereferenceChecker::VisitLocation(CheckerContext &C, const Stmt *S,
+void DereferenceChecker::visitLocation(CheckerContext &C, const Stmt *S,
SVal l) {
// Check for dereference of an undefined value.
if (l.isUndef()) {
Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=122271&r1=122270&r2=122271&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Mon Dec 20 15:22:47 2010
@@ -1854,7 +1854,7 @@
NI != NE; ++NI) {
// Use the 'state' argument only when the predecessor node is the
// same as Pred. This allows us to catch updates to the state.
- checker->GR_VisitLocation(*CurrSet, *Builder, *this, S, *NI,
+ checker->GR_visitLocation(*CurrSet, *Builder, *this, S, *NI,
*NI == Pred ? state : GetState(*NI),
location, tag, isLoad);
}
Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=122271&r1=122270&r2=122271&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MallocChecker.cpp Mon Dec 20 15:22:47 2010
@@ -81,7 +81,7 @@
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S);
const GRState *evalAssume(const GRState *state, SVal Cond, bool Assumption,
bool *respondsToCallback);
- void VisitLocation(CheckerContext &C, const Stmt *S, SVal l);
+ void visitLocation(CheckerContext &C, const Stmt *S, SVal l);
virtual void PreVisitBind(CheckerContext &C, const Stmt *StoreE,
SVal location, SVal val);
@@ -650,7 +650,7 @@
}
// Check if the location is a freed symbolic region.
-void MallocChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l) {
+void MallocChecker::visitLocation(CheckerContext &C, const Stmt *S, SVal l) {
SymbolRef Sym = l.getLocSymbolInBase();
if (Sym) {
const RefState *RS = C.getState()->get<RegionState>(Sym);
More information about the cfe-commits
mailing list