summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Checker')
-rw-r--r--clang/lib/Checker/BugReporter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Checker/BugReporter.cpp b/clang/lib/Checker/BugReporter.cpp
index 560953f358a..0422d80ae26 100644
--- a/clang/lib/Checker/BugReporter.cpp
+++ b/clang/lib/Checker/BugReporter.cpp
@@ -925,7 +925,7 @@ public:
// statement (if it doesn't already exist).
// FIXME: Should handle CXXTryStmt if analyser starts supporting C++.
if (const CompoundStmt *CS =
- PDB.getCodeDecl().getCompoundBody())
+ dyn_cast_or_null<CompoundStmt>(PDB.getCodeDecl().getBody()))
if (!CS->body_empty()) {
SourceLocation Loc = (*CS->body_begin())->getLocStart();
rawAddEdge(PathDiagnosticLocation(Loc, PDB.getSourceManager()));
OpenPOWER on IntegriCloud