Allow use of byref (__block attributed) arrays inside
the block. Fixes radar 7671883.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97863 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index d8648f2..10001c3 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1691,7 +1691,7 @@
       return ExprError();
     }
 
-    if (VD->getType()->isArrayType()) {
+    if (VD->getType()->isArrayType() && !VD->hasAttr<BlocksAttr>()) {
       Diag(Loc, diag::err_ref_array_type);
       Diag(D->getLocation(), diag::note_declared_at);
       return ExprError();