summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-cc/RewriteBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/clang-cc/RewriteBlocks.cpp')
-rw-r--r--clang/tools/clang-cc/RewriteBlocks.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/tools/clang-cc/RewriteBlocks.cpp b/clang/tools/clang-cc/RewriteBlocks.cpp
index a9324e66669..f9ed0ecc095 100644
--- a/clang/tools/clang-cc/RewriteBlocks.cpp
+++ b/clang/tools/clang-cc/RewriteBlocks.cpp
@@ -1091,8 +1091,9 @@ void RewriteBlocks::HandleDeclInMainFile(Decl *D) {
// prototype. This enables us to rewrite function declarations and
// definitions using the same code.
RewriteFunctionProtoType(FD->getType(), FD);
-
- if (CompoundStmt *Body = FD->getBody(*Context)) {
+
+ // FIXME: Handle CXXTryStmt
+ if (CompoundStmt *Body = FD->getCompoundBody(*Context)) {
CurFunctionDef = FD;
FD->setBody(cast_or_null<CompoundStmt>(RewriteFunctionBody(Body)));
// This synthesizes and inserts the block "impl" struct, invoke function,
OpenPOWER on IntegriCloud