aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-02 23:19:29 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-02 23:19:29 +0000
commit0296c22557b3735e2ffeff690eb46fb0e9152bcc (patch)
treef5317dcdf2e4bd33f20c60592ecacf91978dd497 /lib/Analysis/GRExprEngine.cpp
parenta6f14e1a7ee3a9343a838297c73ca87fddb9ed4a (diff)
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
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 2ac10bbb6e..f9020eea21 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -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.