Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp
index 946548e..1a4af47 100644
--- a/lib/Analysis/PathDiagnostic.cpp
+++ b/lib/Analysis/PathDiagnostic.cpp
@@ -15,6 +15,7 @@
 #include "clang/AST/Expr.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
+#include "clang/AST/StmtCXX.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/Casting.h"
 #include <sstream>
@@ -197,8 +198,12 @@
         // FIXME: We would like to always get the function body, even
         // when it needs to be de-serialized, but getting the
         // ASTContext here requires significant changes.
-        if (CompoundStmt *Body = FD->getBodyIfAvailable())
-          return Body->getSourceRange();
+        if (Stmt *Body = FD->getBodyIfAvailable()) {
+          if (CompoundStmt *CS = dyn_cast<CompoundStmt>(Body))
+            return CS->getSourceRange();
+          else
+            return cast<CXXTryStmt>(Body)->getSourceRange();
+        }
       }
       else {
         SourceLocation L = D->getLocation();