diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-11 19:45:13 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-11 19:45:13 +0000 |
commit | f7fbbda62705352a53ac3b495a1128946a34ced3 (patch) | |
tree | c042c25f9a66e26035ade70033885735ffaa22cf /lib/StaticAnalyzer/Checkers/MallocChecker.cpp | |
parent | 4e97586b804f6132d83cb534f16a5b6a7756e819 (diff) |
[analyzer] Add 'isLoad' parameter in Checker::visitLocation() to conveniently distinguish between loads/stores.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 9375947abb..36968ecd1f 100644 --- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -82,7 +82,7 @@ public: void PreVisitReturnStmt(CheckerContext &C, const ReturnStmt *S); const GRState *evalAssume(const GRState *state, SVal Cond, bool Assumption, bool *respondsToCallback); - void visitLocation(CheckerContext &C, const Stmt *S, SVal l); + void visitLocation(CheckerContext &C, const Stmt *S, SVal l, bool isLoad); virtual void PreVisitBind(CheckerContext &C, const Stmt *StoreE, SVal location, SVal val); @@ -653,7 +653,8 @@ const GRState *MallocChecker::evalAssume(const GRState *state, SVal Cond, } // Check if the location is a freed symbolic region. -void MallocChecker::visitLocation(CheckerContext &C, const Stmt *S, SVal l) { +void MallocChecker::visitLocation(CheckerContext &C, const Stmt *S, SVal l, + bool isLoad) { SymbolRef Sym = l.getLocSymbolInBase(); if (Sym) { const RefState *RS = C.getState()->get<RegionState>(Sym); |