aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-11 19:45:13 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-01-11 19:45:13 +0000
commitf7fbbda62705352a53ac3b495a1128946a34ced3 (patch)
treec042c25f9a66e26035ade70033885735ffaa22cf /lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
parent4e97586b804f6132d83cb534f16a5b6a7756e819 (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/DereferenceChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp b/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
index 7dc8ec84df..3f6f943329 100644
--- a/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
@@ -29,7 +29,8 @@ class DereferenceChecker : public Checker {
public:
DereferenceChecker() : BT_null(0), BT_undef(0) {}
static void *getTag() { static int tag = 0; return &tag; }
- void visitLocation(CheckerContext &C, const Stmt *S, SVal location);
+ void visitLocation(CheckerContext &C, const Stmt *S, SVal location,
+ bool isLoad);
std::pair<ExplodedNode * const*, ExplodedNode * const*>
getImplicitNodes() const {
@@ -85,7 +86,7 @@ void DereferenceChecker::AddDerefSource(llvm::raw_ostream &os,
}
void DereferenceChecker::visitLocation(CheckerContext &C, const Stmt *S,
- SVal l) {
+ SVal l, bool isLoad) {
// Check for dereference of an undefined value.
if (l.isUndef()) {
if (ExplodedNode *N = C.generateSink()) {