diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-19 12:50:00 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-19 12:50:00 +0000 |
commit | f7a50a4ee255b3a624ae64125537a7bdbd1da0ef (patch) | |
tree | adbc6920d78900f23872d7bea36e9ba82e44af7f /lib/Analysis/BugReporter.cpp | |
parent | ad97866feb07ad0ab7ba6fd1cdce939ea6dcb836 (diff) |
Get the Decl from the current ExplodedNode. Eventually the diagnostic client
and other core analysis logic will be untied to a particular Decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 2e2665c173..62313c67b6 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -189,7 +189,8 @@ PathDiagnosticBuilder::ExecutionContinues(const ExplodedNode* N) { if (const Stmt *S = GetNextStmt(N)) return PathDiagnosticLocation(S, getSourceManager()); - return FullSourceLoc(getCodeDecl().getBodyRBrace(), getSourceManager()); + return FullSourceLoc(N->getLocationContext()->getDecl()->getBodyRBrace(), + getSourceManager()); } PathDiagnosticLocation @@ -208,7 +209,8 @@ PathDiagnosticBuilder::ExecutionContinues(llvm::raw_string_ostream& os, << '.'; else os << "Execution jumps to the end of the " - << (isa<ObjCMethodDecl>(getCodeDecl()) ? "method" : "function") << '.'; + << (isa<ObjCMethodDecl>(N->getLocationContext()->getDecl()) ? + "method" : "function") << '.'; return Loc; } |