[cfe-commits] r85838 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRExprEngine.h lib/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Mon Nov 2 15:19:29 PST 2009


Author: kremenek
Date: Mon Nov  2 17:19:29 2009
New Revision: 85838

URL: http://llvm.org/viewvc/llvm-project?rev=85838&view=rev
Log:
Remove GRExprEngine::CheckerVisitLocation().  It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
    cfe/trunk/lib/Analysis/GRExprEngine.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h?rev=85838&r1=85837&r2=85838&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h Mon Nov  2 17:19:29 2009
@@ -412,9 +412,6 @@
   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);

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=85838&r1=85837&r2=85838&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Mon Nov  2 17:19:29 2009
@@ -139,21 +139,6 @@
   // 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 @@
   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.





More information about the cfe-commits mailing list