diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-09-02 13:26:26 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-09-02 13:26:26 +0000 |
commit | 6403b57eda05a22273d920ad0bd2991d11eaa7b8 (patch) | |
tree | ab637a053e55c1442059e9fba282eae561ff113f /lib/Analysis/BugReporterVisitors.cpp | |
parent | de18d1264ea01234ca864606a8717272b2c7c5fb (diff) |
Refactor the check for bad divide into a checker.
Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporterVisitors.cpp')
-rw-r--r-- | lib/Analysis/BugReporterVisitors.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/BugReporterVisitors.cpp b/lib/Analysis/BugReporterVisitors.cpp index fce31e70f0..8b3502805d 100644 --- a/lib/Analysis/BugReporterVisitors.cpp +++ b/lib/Analysis/BugReporterVisitors.cpp @@ -55,7 +55,7 @@ clang::bugreporter::GetReceiverExpr(const ExplodedNode *N){ const Stmt* clang::bugreporter::GetDenomExpr(const ExplodedNode *N) { - const Stmt *S = N->getLocationAs<PostStmt>()->getStmt(); + const Stmt *S = N->getLocationAs<PreStmt>()->getStmt(); if (const BinaryOperator *BE = dyn_cast<BinaryOperator>(S)) return BE->getRHS(); return NULL; |