]> granicus.if.org Git - clang/commitdiff
Remove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so...
authorTed Kremenek <kremenek@apple.com>
Mon, 2 Nov 2009 23:19:29 +0000 (23:19 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 2 Nov 2009 23:19:29 +0000 (23:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85838 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GRExprEngine.h
lib/Analysis/GRExprEngine.cpp

index 90124c279daaec6e5086159e1f9cc5c089e4fc8d..cfb9ce95ea1d00293e08597e6e822f4cd9e19afd 100644 (file)
@@ -412,9 +412,6 @@ protected:
   void CheckerVisit(Stmt *S, ExplodedNodeSet &Dst, ExplodedNodeSet &Src, 
                     bool isPrevisit);
 
-  ExplodedNode *CheckerVisitLocation(Stmt *S, ExplodedNode *Pred, 
-                                     const GRState *state, SVal V);
-
   /// Visit - Transfer function logic for all statements.  Dispatches to
   ///  other functions that handle specific kinds of statements.
   void Visit(Stmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst);
index 2ac10bbb6e31cdf5ec3fa904ae35df028a395f11..f9020eea21179ad9167dd15b55ecf7ec3efceb80 100644 (file)
@@ -139,21 +139,6 @@ void GRExprEngine::CheckerVisit(Stmt *S, ExplodedNodeSet &Dst,
   // automatically.
 }
 
-ExplodedNode *GRExprEngine::CheckerVisitLocation(Stmt *S, ExplodedNode *Pred, 
-                                                const GRState *state, SVal V) {
-  if (Checkers.empty())
-    return Pred;
-
-  for (CheckersOrdered::iterator I = Checkers.begin(), 
-         E = Checkers.end(); I != E; ++I) {
-    Pred = I->second->CheckLocation(S, Pred, state, V, *this);
-    if (!Pred)
-      break;
-  }
-
-  return Pred;
-}
-
 //===----------------------------------------------------------------------===//
 // Engine construction and deletion.
 //===----------------------------------------------------------------------===//
@@ -1207,11 +1192,18 @@ ExplodedNode* GRExprEngine::EvalLocation(Stmt* Ex, ExplodedNode* Pred,
   SaveAndRestore<const void*> OldTag(Builder->Tag);
   Builder->Tag = tag;
 
-  if (location.isUnknown())
+  if (location.isUnknown() || Checkers.empty())
     return Pred;
 
-  return CheckerVisitLocation(Ex, Pred, state, location);
-
+  
+  for (CheckersOrdered::iterator I=Checkers.begin(), E=Checkers.end(); I!=E;++I)
+  {
+    Pred = I->second->CheckLocation(Ex, Pred, state, location, *this);
+    if (!Pred)
+      break;
+  }
+  
+  return Pred;
 
   // FIXME: Temporarily disable out-of-bounds checking until we make
   // the logic reflect recent changes to CastRegion and friends.