From 568bc8456288b97f77164288ce0e0f3a9bbc73d5 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 7 Jul 2010 11:31:34 +0000 Subject: Remove Decl::getCompoundBody(). This has 2 (slight) advantages: -Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt. -Better tracking of Decl::getBody()'s callsites. llvm-svn: 107771 --- clang/lib/Checker/BugReporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Checker/BugReporter.cpp') 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(PDB.getCodeDecl().getBody())) if (!CS->body_empty()) { SourceLocation Loc = (*CS->body_begin())->getLocStart(); rawAddEdge(PathDiagnosticLocation(Loc, PDB.getSourceManager())); -- cgit v1.2.3