Remove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85838 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Analysis/PathSensitive/GRExprEngine.h b/include/clang/Analysis/PathSensitive/GRExprEngine.h
index 90124c2..cfb9ce9 100644
--- a/include/clang/Analysis/PathSensitive/GRExprEngine.h
+++ b/include/clang/Analysis/PathSensitive/GRExprEngine.h
@@ -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);
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 2ac10bb..f9020ee 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -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.