diff options
Diffstat (limited to 'clang/lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | clang/lib/Rewrite/RewriteObjC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/RewriteObjC.cpp b/clang/lib/Rewrite/RewriteObjC.cpp index d6fe4e3b283..204ec264156 100644 --- a/clang/lib/Rewrite/RewriteObjC.cpp +++ b/clang/lib/Rewrite/RewriteObjC.cpp @@ -5651,7 +5651,7 @@ void RewriteObjC::HandleDeclInMainFile(Decl *D) { RewriteBlocksInFunctionProtoType(FD->getType(), FD); // FIXME: If this should support Obj-C++, support CXXTryStmt - if (CompoundStmt *Body = FD->getCompoundBody()) { + if (CompoundStmt *Body = dyn_cast_or_null<CompoundStmt>(FD->getBody())) { CurFunctionDef = FD; CurFunctionDeclToDeclareForBlock = FD; CollectPropertySetters(Body); |