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 | 080fa0522b969a909e2f40d8e56a77c8cc476f20 (patch) | |
tree | e8913eaf22fd5af713ea659ce94e7fcc690a9186 /clang/lib/Analysis/BugReporter.cpp | |
parent | a21fe10c06eb21deb170a2477a2392ccc6e94ca6 (diff) | |
download | bcm5719-llvm-080fa0522b969a909e2f40d8e56a77c8cc476f20.tar.gz bcm5719-llvm-080fa0522b969a909e2f40d8e56a77c8cc476f20.zip |
Get the Decl from the current ExplodedNode. Eventually the diagnostic client
and other core analysis logic will be untied to a particular Decl.
llvm-svn: 79420
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index 2e2665c1738..62313c67b65 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/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; } |