From 1790c975e76d9cb267b78b190d2aaaf62060a4c1 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 11 Jan 2011 19:45:13 +0000 Subject: [analyzer] Add 'isLoad' parameter in Checker::visitLocation() to conveniently distinguish between loads/stores. llvm-svn: 123261 --- clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp') diff --git a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp index 13e628bcb1a..d52427bf9d6 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp @@ -27,7 +27,7 @@ class ArrayBoundChecker : public: ArrayBoundChecker() : BT(0) {} static void *getTag() { static int x = 0; return &x; } - void visitLocation(CheckerContext &C, const Stmt *S, SVal l); + void visitLocation(CheckerContext &C, const Stmt *S, SVal l, bool isLoad); }; } @@ -35,7 +35,8 @@ void ento::RegisterArrayBoundChecker(ExprEngine &Eng) { Eng.registerCheck(new ArrayBoundChecker()); } -void ArrayBoundChecker::visitLocation(CheckerContext &C, const Stmt *S, SVal l){ +void ArrayBoundChecker::visitLocation(CheckerContext &C, const Stmt *S, SVal l, + bool isLoad) { // Check for out of bound array element access. const MemRegion *R = l.getAsRegion(); if (!R) -- cgit v1.2.3