[cfe-dev] ObjC blocks documentation

Anastasia Stulova via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 8 02:30:41 PST 2016


Hi,

It seems that capturing arrays is not allowed in Clang Blocks i.e. the following code:

  int arr[10];

  int* (^bl)() = ^ int*() {return arr;};

fails with:

  error: cannot refer to declaration with an array type inside block

I have checked the documentation on Blocks in Clang  and some ObjC manual but can't find anything related to it.
Also the Clang commit history doesn't provide much information.

Does anyone know why is this restricted? Or could anyone point to good documentation where such things are explained?

Thanks in advance,
Anastasia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160308/ab45fad1/attachment.html>


More information about the cfe-dev mailing list