[PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 5 09:14:21 PST 2016


Anastasia created this revision.
Anastasia added reviewers: pekka.jaaskelainen, pxli168.
Anastasia added a subscriber: cfe-commits.
Anastasia set the repository for this revision to rL LLVM.

Applying the following restrictions for block variables in OpenCL (v2.0 s6.12.5):

- __block storage class is disallowed
- variadic arguments are disallowed
- every block declaration must be const qualified and initialized
- a block can't be used as a return type of a function
- extern speficier is disallowed

This adds diagnostics missing from http://reviews.llvm.org/D16047

Repository:
  rL LLVM

http://reviews.llvm.org/D16928

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaType.cpp
  test/CodeGen/blocks-opencl.cl
  test/SemaOpenCL/event_t.cl
  test/SemaOpenCL/invalid-blocks-cl20.cl
  test/SemaOpenCL/invalid-func.cl
  test/SemaOpenCL/invalid-kernel-parameters.cl
  test/SemaOpenCL/sampler_t.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16928.47020.patch
Type: text/x-patch
Size: 12392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160205/28dfee34/attachment.bin>


More information about the cfe-commits mailing list