summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/MallocChecker.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2010-08-04 07:10:57 +0000
committerJordy Rose <jediknil@belkadan.com>2010-08-04 07:10:57 +0000
commitc36df4d0b73a1aee53805b8fd1c223a89824ceb4 (patch)
tree6ada43807e40e3b9e8b687d899da353c63a85e65 /clang/lib/Checker/MallocChecker.cpp
parent1d3dc20aaa7a5c3ad60437da6947330e334ef44e (diff)
downloadbcm5719-llvm-c36df4d0b73a1aee53805b8fd1c223a89824ceb4.tar.gz
bcm5719-llvm-c36df4d0b73a1aee53805b8fd1c223a89824ceb4.zip
Change the checker callback cache in GRExprEngine to be more compact (and IMHO a little easier to understand), and add the same sort of caching for EvalAssume (tied for least-used callback), mostly as proof-of-concept.
Before we go further with these, we should figure out a way to reuse the visit-and-cache code in CheckerVisit. llvm-svn: 110191
Diffstat (limited to 'clang/lib/Checker/MallocChecker.cpp')
-rw-r--r--clang/lib/Checker/MallocChecker.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Checker/MallocChecker.cpp b/clang/lib/Checker/MallocChecker.cpp
index 4ed309513e3..f6125636f2a 100644
--- a/clang/lib/Checker/MallocChecker.cpp
+++ b/clang/lib/Checker/MallocChecker.cpp
@@ -75,7 +75,8 @@ public:
void EvalDeadSymbols(CheckerContext &C, SymbolReaper &SymReaper);
void EvalEndPath(GREndPathNodeBuilder &B, void *tag, GRExprEngine &Eng);
void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S);
- const GRState *EvalAssume(const GRState *state, SVal Cond, bool Assumption);
+ const GRState *EvalAssume(const GRState *state, SVal Cond, bool Assumption,
+ bool *respondsToCallback);
void VisitLocation(CheckerContext &C, const Stmt *S, SVal l);
virtual void PreVisitBind(CheckerContext &C, const Stmt *AssignE,
const Stmt *StoreE, SVal location,
@@ -629,7 +630,8 @@ void MallocChecker::PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S) {
}
const GRState *MallocChecker::EvalAssume(const GRState *state, SVal Cond,
- bool Assumption) {
+ bool Assumption,
+ bool * /* respondsToCallback */) {
// If a symblic region is assumed to NULL, set its state to AllocateFailed.
// FIXME: should also check symbols assumed to non-null.
OpenPOWER on IntegriCloud