reject returning a block expr even when it has parens and casts in the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81176 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 24eb8b1..a63e044 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -1254,9 +1254,7 @@
        << DR->getDecl()->getDeclName() << RetValExp->getSourceRange();
     
     // Skip over implicit cast expressions when checking for block expressions.
-    if (ImplicitCastExpr *IcExpr = 
-          dyn_cast_or_null<ImplicitCastExpr>(RetValExp))
-      RetValExp = IcExpr->getSubExpr();
+    RetValExp = RetValExp->IgnoreParenCasts();
 
     if (BlockExpr *C = dyn_cast_or_null<BlockExpr>(RetValExp))
       if (C->hasBlockDeclRefExprs())