[PATCH] D51722: [OpenCL] Allow blocks to capture arrays in OpenCL

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 6 07:12:23 PDT 2018


Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.

LGTM! There is a small comment that can be addressed before the final commit. Thanks!



================
Comment at: lib/Sema/SemaExpr.cpp:14627
 
-  // Blocks are not allowed to capture arrays.
-  if (CaptureType->isArrayType()) {
+  // Blocks are not allowed to capture arrays, excepting OpenCL.
+  if (!S.getLangOpts().OpenCL && CaptureType->isArrayType()) {
----------------
It would be good to add spec reference here.


Repository:
  rC Clang

https://reviews.llvm.org/D51722





More information about the cfe-commits mailing list