]> granicus.if.org Git - clang/commitdiff
Rename 'VisitLocation' to 'visitLocation'.
authorTed Kremenek <kremenek@apple.com>
Mon, 20 Dec 2010 21:22:47 +0000 (21:22 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 20 Dec 2010 21:22:47 +0000 (21:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122271 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Checker/PathSensitive/Checker.h
lib/Checker/ArrayBoundChecker.cpp
lib/Checker/DereferenceChecker.cpp
lib/Checker/GRExprEngine.cpp
lib/Checker/MallocChecker.cpp

index 7693983e3ae76d9c1873d22d166b272e6ec16dfa..eb4d13069c94d8ecc57e981d800a2454e9695ebb 100644 (file)
@@ -233,7 +233,7 @@ private:
   }
   
   // 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 @@ private:
     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 @@ public:
   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) {}
index 78c335cb3ede94072d9a4c3af9e45d117f389359..df21595a4132d578b18179b6c8f39603eacc31a6 100644 (file)
@@ -24,9 +24,9 @@ class ArrayBoundChecker :
     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 @@ void clang::RegisterArrayBoundChecker(GRExprEngine &Eng) {
   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)
index 0f75cc00bcfb5c9bd8ee19c19767681a2be64ef4..5938ca18246d5e7235d529511e3c2f14ddea125a 100644 (file)
@@ -28,7 +28,7 @@ class DereferenceChecker : public Checker {
 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::AddDerefSource(llvm::raw_ostream &os,
   }
 }
 
-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()) {
index f50fa66bead5c2ccb097ccaa2cdc2913c58a9570..2945de162a9f37a0f839ec1f0926724aa400dd92 100644 (file)
@@ -1854,7 +1854,7 @@ void GRExprEngine::evalLocation(ExplodedNodeSet &Dst, const Stmt *S,
          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);
     }
index e6dae7ff72164e5c705474e2f094b4a4653ddd20..3cc3670645e7c737f99368ab79557ae35adf301d 100644 (file)
@@ -81,7 +81,7 @@ public:
   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 @@ const GRState *MallocChecker::evalAssume(const GRState *state, SVal Cond,
 }
 
 // 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);