summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 348ab3d09a7..397d28b6e2e 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/lib/Analysis/BugReporter.cpp
@@ -189,7 +189,7 @@ PathDiagnosticBuilder::ExecutionContinues(const ExplodedNode<GRState>* N) {
if (Stmt *S = GetNextStmt(N))
return PathDiagnosticLocation(S, SMgr);
- return FullSourceLoc(CodeDecl.getBody(getContext())->getRBracLoc(), SMgr);
+ return FullSourceLoc(CodeDecl.getBodyRBrace(getContext()), SMgr);
}
PathDiagnosticLocation
@@ -825,7 +825,9 @@ public:
// Finally, add an initial edge from the start location of the first
// statement (if it doesn't already exist).
- if (const CompoundStmt *CS = PDB.getCodeDecl().getBody(PDB.getContext()))
+ // FIXME: Should handle CXXTryStmt if analyser starts supporting C++.
+ if (const CompoundStmt *CS =
+ PDB.getCodeDecl().getCompoundBody(PDB.getContext()))
if (!CS->body_empty()) {
SourceLocation Loc = (*CS->body_begin())->getLocStart();
rawAddEdge(PathDiagnosticLocation(Loc, PDB.getSourceManager()));
OpenPOWER on IntegriCloud