aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporterVisitors.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-09-02 08:10:35 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-09-02 08:10:35 +0000
commitd99f3615825bf1e26ac670f6c2c2b70b7b765e14 (patch)
tree9259cf7e5accf492b3fafafedd2c55c99614085d /lib/Analysis/BugReporterVisitors.cpp
parent904e1e30f945dc11d9a6b08314db6e5bdb07e3ec (diff)
Refactor bad callee check into a Checker.
Now bad callee is checked as a PreVisit to the CallExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporterVisitors.cpp')
-rw-r--r--lib/Analysis/BugReporterVisitors.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/BugReporterVisitors.cpp b/lib/Analysis/BugReporterVisitors.cpp
index 5c31066eff..fce31e70f0 100644
--- a/lib/Analysis/BugReporterVisitors.cpp
+++ b/lib/Analysis/BugReporterVisitors.cpp
@@ -63,7 +63,8 @@ clang::bugreporter::GetDenomExpr(const ExplodedNode *N) {
const Stmt*
clang::bugreporter::GetCalleeExpr(const ExplodedNode *N) {
- const Stmt *S = N->getLocationAs<PostStmt>()->getStmt();
+ // Callee is checked as a PreVisit to the CallExpr.
+ const Stmt *S = N->getLocationAs<PreStmt>()->getStmt();
if (const CallExpr *CE = dyn_cast<CallExpr>(S))
return CE->getCallee();
return NULL;