diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-04-06 22:10:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-04-06 22:10:18 +0000 |
commit | bd613137499b1d4c3b63dccd0aa21f6add243f4f (patch) | |
tree | dcdae129e5d102c0bb9e98abba82d7a988989c38 /include/clang/StaticAnalyzer/Core/CheckerManager.h | |
parent | d2953ce57a4f1b0a6884b3d6b35266ab4f79fa7f (diff) |
Rework ExprEngine::evalLoad and clients (e.g. VisitBinaryOperator) so that when we generate a new ExplodedNode
we use the same Expr* as the one being currently visited. This is preparation for transitioning to having
ProgramPoints refer to CFGStmts.
This required a bit of trickery. We wish to keep the old Expr* bindings in the Environment intact,
as plenty of logic relies on it and there is no reason to change it, but we sometimes want the Stmt* for
the ProgramPoint to be different than the Expr* being used for bindings. This requires adding an extra
argument for some functions (e.g., evalLocation). This looks a bit strange for some clients, but
it will look a lot cleaner when were start using CFGStmt* in the appropriate places.
As some fallout, the diagnostics arrows are a bit difference, since some of the node locations have changed.
I have audited these, and they look reasonable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/CheckerManager.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/CheckerManager.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/clang/StaticAnalyzer/Core/CheckerManager.h b/include/clang/StaticAnalyzer/Core/CheckerManager.h index 79c94bcd85..d215f992e6 100644 --- a/include/clang/StaticAnalyzer/Core/CheckerManager.h +++ b/include/clang/StaticAnalyzer/Core/CheckerManager.h @@ -229,8 +229,10 @@ public: /// \brief Run checkers for load/store of a location. void runCheckersForLocation(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, - SVal location, bool isLoad, - const Stmt *S, + SVal location, + bool isLoad, + const Stmt *NodeEx, + const Stmt *BoundEx, ExprEngine &Eng); /// \brief Run checkers for binding of a value to a location. @@ -343,7 +345,8 @@ public: typedef CheckerFn<void (const ObjCMessage &, CheckerContext &)> CheckObjCMessageFunc; - typedef CheckerFn<void (const SVal &location, bool isLoad, const Stmt *S, + typedef CheckerFn<void (const SVal &location, bool isLoad, + const Stmt *S, CheckerContext &)> CheckLocationFunc; |