diff options
author | Anna Zaks <ganna@apple.com> | 2011-10-06 00:43:15 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-10-06 00:43:15 +0000 |
commit | 390909c89c98ab1807e15e033a72e975f866fb23 (patch) | |
tree | 8936f507a0b5c205821695c89650f6d0718081a3 /lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp | |
parent | d1ab1a2dffa66a88e5215216893adcfc658d3e7e (diff) |
[analyzer] Remove the dependency on CheckerContext::getStmt() as well as the method itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp index b0c4bee424..5ca4a9fe46 100644 --- a/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp @@ -27,11 +27,13 @@ class UndefinedAssignmentChecker mutable llvm::OwningPtr<BugType> BT; public: - void checkBind(SVal location, SVal val, CheckerContext &C) const; + void checkBind(SVal location, SVal val, const Stmt *S, + CheckerContext &C) const; }; } void UndefinedAssignmentChecker::checkBind(SVal location, SVal val, + const Stmt *StoreE, CheckerContext &C) const { if (!val.isUndef()) return; @@ -49,7 +51,6 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val, // Generate a report for this bug. const Expr *ex = 0; - const Stmt *StoreE = C.getStmt(); while (StoreE) { if (const BinaryOperator *B = dyn_cast<BinaryOperator>(StoreE)) { if (B->isCompoundAssignmentOp()) { |